PJ Codes
PJ Codes
sing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using System.Data.Common;
using System.IO;
namespace DataAccessLayer
{
public class DAChangePassword
{
public static int ChangePassword(string OldPass, string NewPass, string ConfirmPass, string
CusID)
{
try
{
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
Database db = new SqlDatabase(ConStr);
using (DbCommand dbcmd =
db.GetStoredProcCommand("CustomerPasswordUpdate_SP"))
{
db.ExecuteNonQuery(dbcmd);
int Status = 0;
//cmd.Connection = Con;
//cmd.CommandType = CommandType.StoredProcedure;
//cmd.CommandText = "CustomerPasswordUpdate";
//Con.Open();
//cmd.Parameters.AddWithValue("@C_Old_Pass", OldPass);
//cmd.Parameters.AddWithValue("@C_New_Passs", NewPass);
//cmd.Parameters.AddWithValue("@Cus_ID", CusID);
//SqlParameter output = cmd.Parameters.Add("@Status", SqlDbType.Int);
//output.Direction = ParameterDirection.Output;
//cmd.ExecuteNonQuery();
//int status = 0;
//status = Convert.ToInt32(output.Value.ToString());
//Con.Close();
//return status;
}
namespace DataAccessLayer
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
int Status = 0;
return Status;
//cmd.Connection = Con;
//cmd.CommandType = CommandType.StoredProcedure;
//cmd.CommandText = "CustomerPasswordUpdate";
//Con.Open();
//cmd.Parameters.AddWithValue("@C_Old_Pass", OldPass);
//cmd.Parameters.AddWithValue("@C_New_Passs", NewPass);
//cmd.Parameters.AddWithValue("@Cus_ID", CusID);
//output.Direction = ParameterDirection.Output;
//cmd.ExecuteNonQuery();
//int status = 0;
//status = Convert.ToInt32(output.Value.ToString());
//Con.Close();
//return status;
throw Excptn_ChangePassword;
LOG IN
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using System.Configuration.Assemblies;
using System.Configuration;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using System.Data.Common;
using System.IO;
namespace DataAccessLayer
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
int Status = 0;
return Status;
//command.CommandType = CommandType.StoredProcedure;
//command.CommandText = "LogInValidation";
//command.Connection = connect;
//command.Parameters.AddWithValue("@username", username);
//command.Parameters.AddWithValue("@passwrd", pass);
//param1.Direction = ParameterDirection.Output;
//connect.Open();
//command.ExecuteNonQuery();
//int status = Convert.ToInt32(param1.Value.ToString());
//connect.Close();
//return status;
throw Excptn_LoginvalidationD;
DAMainMaster.cs
namespace DataAccessLayer
public static void DACustomerData(string CusName, out int Cus_ID, out string CusMail, out string
CusDOB, out string CusAddress, out string CusPhone, out string CusGender, out string Bal_Amount)
try
{
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
db.ExecuteNonQuery(dbcmd);
//con2.Open();
//cmd2.Connection = con2;
//cmd2.CommandText = "CustomerDetailsFetch";
//cmd2.CommandType = CommandType.StoredProcedure;
//sp01.Direction = ParameterDirection.Output;
//sp02.Direction = ParameterDirection.Output;
//sp03.Direction = ParameterDirection.Output;
//sp04.Direction = ParameterDirection.Output;
//sp05.Direction = ParameterDirection.Output;
//sp06.Direction = ParameterDirection.Output;
//sp07.Direction = ParameterDirection.Output;
//cmd2.ExecuteNonQuery();
//Cus_ID = Convert.ToInt32(sp01.Value.ToString());
//CusMail = sp02.Value.ToString();
//CusDOB = sp03.Value.ToString();
//CusAddress = sp04.Value.ToString();
//CusPhone = sp05.Value.ToString();
//CusGender = sp06.Value.ToString();
//Bal_Amount = sp07.Value.ToString();
//con2.Close();
throw Excptn_DACustomerData;
}
DAPrepaidWaller.cs
namespace DataAccessLayer
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
db.ExecuteNonQuery(dbcmd);
//cmd2.Connection = con2;
//cmd2.CommandText = "PrepaidBal";
//cmd2.CommandType = CommandType.StoredProcedure;
//cmd2.Parameters.AddWithValue("@name", name);
//output.Direction = ParameterDirection.Output;
//cmd2.ExecuteNonQuery();
//con2.Close();
//Balance = output.Value.ToString();
throw Excptn_DAWalletBalance;
}
DAProfile.cs
namespace DataAccessLayer
public static void ProfileUpdate(string CusID, string CusName, string CusMail, string CusDOB, string
CusAdrs, string CusPhone, string CusGender, out int Status)
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
db.ExecuteNonQuery(dbcmd);
//con.Open();
//cmd.Connection = con;
//cmd.CommandText = "CustomerProfileUpdate";
//cmd.CommandType = CommandType.StoredProcedure;
//stat.Direction = ParameterDirection.Output;
//sp02.Value = CusName;
//sp03.Value = CusMail;
//sp05.Value = CusDOB;
//sp06.Value = CusAdrs;
//sp07.Value = CusPhone;
//sp08.Value = CusGender;
//cmd.ExecuteNonQuery();
//status = Convert.ToInt32(stat.Value.ToString());
//con.Close();
throw Excptn_ProfileUpdate;
DAReg.cs
namespace DataAccessLayer
public static int RegistrationD(string Cus_Name, string Cus_Username, string Cus_Mail, string
Cus_Pass, string Cus_DOB, string Cus_Address, double Cus_Phone, string Cus_Gender, string
Cus_SSNType, string Cus_SSN)
{
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
return Status;
//string s = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
//command.CommandText = "CustomerReg";
//command.Connection = connect;
//command.Parameters.AddWithValue("@CName", name);
//command.Parameters.AddWithValue("@CUName", username);
//command.Parameters.AddWithValue("@CMail", email);
//command.Parameters.AddWithValue("@CPass", pass);
//command.Parameters.AddWithValue("@CDOB", dob);
//command.Parameters.AddWithValue("@CAddress", address);
//command.Parameters.AddWithValue("@CPhone", phone);
//command.Parameters.AddWithValue("@CGeneder", ugender);
//command.Parameters.AddWithValue("@CSSNType", ssnt);
//command.Parameters.AddWithValue("@CSSN", ssn);
//connect.Open();
//connect.Close();
//return status;
throw Excptn_RegistrationD;
}
DACancel.cs
namespace DataAccessLayer
public static void DataCancel(double Booking_ID, out int Status, out int Refund_Amount, int CusID)
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
//cmd.Connection = con;
//cmd.CommandText = "CancelBook";
//cmd.CommandType = CommandType.StoredProcedure;
//cmd.Parameters.AddWithValue("@booking_id", booking_id);
//param1.Direction = ParameterDirection.Output;
//param2.Direction = ParameterDirection.Output;
//con.Open();
//cmd.ExecuteNonQuery();
//con.Close();
//status = Convert.ToInt32(param1.Value.ToString());
//amount = Convert.ToInt32(param2.Value.ToString());
}
catch (SqlException Excptn_DataCancel)
throw Excptn_DataCancel;
DABookingHistory.cs
namespace DataAccessLayer
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
dt = null;
dt = dbs.ExecuteDataSet(dbcmd).Tables[0];
return dt;
//cmd.Connection = Con;
//cmd.CommandType = CommandType.StoredProcedure;
//cmd.CommandText = "BookingHistory";
//cmd.Parameters.AddWithValue("@CusID", CusID);
//Con.Open();
//sda.Fill(dt);
//Con.Close();
//return dt;
catch(SqlException Excptn_Bookinghistory)
{
throw Excptn_Bookinghistory;
DABookConfirm.cs
namespace DataAccessLayer
public static double BookConfirmData(double CusID, string CusName, string DateOfJourney, string
FlightID, string AirlineName, string Source_Loc, string Destination_Loc, string Pass_Count, string
Book_Date, string Depart_Time, string Fare, string Total_Fare)
try
string ConnectionStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
db.ExecuteNonQuery(dbcmd);
int bookid = 0;
return bookid;
throw Excptn_BookConfirmData;
}
DASearch.cs
namespace DataAccessLayer
public static DataTable SearchD(string From, string To, string Date, DateTime Time, int Seats)
try
string ConStr =
ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
dt = null;
dt = dbs.ExecuteDataSet(dbcmd).Tables[0];
return dt;
}
//command.CommandType = CommandType.StoredProcedure;
//command.CommandText = "Search_Flight";
//command.Connection = connect;
//connect.Open();
//command.Parameters.AddWithValue("@leaving_from", from);
//command.Parameters.AddWithValue("@going_to", to);
//command.Parameters.AddWithValue("@departure_date", date);
//command.Parameters.AddWithValue("@departure_time", time);
//command.Parameters.AddWithValue("@seat", seats);
//sda.Fill(dt);
//connect.Close();
//return dt;
throw Excptn_SearchD;
}
DataAccessClass.cs
namespace DataAccessLayer
//string s =ConfigurationManager
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "LogInValidation";
command.Connection = connect;
command.Parameters.AddWithValue("@username", username);
command.Parameters.AddWithValue("@passwrd", pass);
param1.Direction = ParameterDirection.Output;
connect.Open();
command.ExecuteNonQuery();
connect.Close();
return status;
public static int RegistrationD(string username, string email, string pass, string dob, string address,
double phone,string ugender, string ssnt, string ssn)
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "CustomerReg";
command.Connection = connect;
command.Parameters.AddWithValue("@CName", username);
command.Parameters.AddWithValue("@CMail", email);
command.Parameters.AddWithValue("@CPass", pass);
command.Parameters.AddWithValue("@CDOB", dob);
command.Parameters.AddWithValue("@CAddress", address);
command.Parameters.AddWithValue("@CPhone", phone);
command.Parameters.AddWithValue("@CGeneder", ugender);
command.Parameters.AddWithValue("@CSSNType",ssnt);
command.Parameters.AddWithValue("@CSSN", ssn);
connect.Open();
connect.Close();
return status;
//public static void SearchD(string from , string to , DateTime date, DateTime time , int seats)
//{
// //command.CommandType = CommandType.StoredProcedure;
// //command.CommandText = "FlightDetails";
// //command.Connection = connect;
// //connect.Open();
// //command.Parameters.AddWithValue("@From", from);
// //command.Parameters.AddWithValue("@To", to);
// //command.Parameters.AddWithValue("@date", date);
// //command.Parameters.AddWithValue("@dep_time", time);
// //command.Parameters.AddWithValue("@no_of_seats", seats);
// //{
// // GridView1.DataSource = rdr;
// // GridView1.DataBind();
// //}
// //else
// //{
// //}
// //connect.Close();
//
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ARS </title>
setTimeout("preventBack()", 0);
</script>
<script>
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
if (!event.target.matches('.dropbtn')) {
var i;
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
MainSite.Master
</script>
</head>
<tr>
<td id="Main_Icon" style="height: 100px; width: 200px; font-family: Forte; line-height: 40px;
font-size: 45px; padding-right: 20px;">
</td>
</button>
<div class="dropdown-content">
</div>
</div>
</td>
</tr>
</table>
<tr>
<ul>
</ul>
</div>
</td>
<td id="Main_Pages" style="height: 480px; width: 1040px; background: rgba(255,255,255,0.9);
border: ridge; opacity: 0.9; padding-right: 20px; border-radius: 8px; text-align: center; table-layout:
fixed;">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server"></asp:ContentPlaceHolder>
</td>
</tr>
</table>
<div id="Main_Footer" style="text-align: center; height: 15px; font-weight: bold; color: black;
border-radius: 8px; border: ridge; background: rgba(255,255,255,0.5); line-height: 15px; font-size:
15PX;">Copyright © AirTicket Reservation System </div>
</form>
</body>
</html>
EntryMatser.Maste
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>ARS </title>
</head>
<tr>
</tr>
</table>
<tr>
<td>
<marque>
AirGo Airlines is currently known as AirGo and it serves its flights for domestic
routes as well as several international routes.</p>
With this facility, you will always get right information about the arrival and
departure timings of any particular flights.
gives you the correct and accurate information about the flights timings. On this
dedicated portal, you can even book your AirGo Airlines flights tickets as well.
One can even check out the AirGo airlines flight schedule on the airlines official
website.For booking your flight tickets, you can simply log-in to makemytrip.com and
follow some simple steps for your ticket booking. Here, you may also get some
attractive offers and discounts on air tickets.
Just make few click of your mouse and fill some information, your booking will be
done in no time. Since its inception, the airline is striving to provide world class facilities to its
customers.</p> <p style="font-
weight:bold"> To get any other
information related to AirGo airlines booking and schedule, passengers can go to the websites or make
call to its toll free numbers.
So, make your journey more comfortable and enjoyable with up to date
information related to your flights. </p>
</marque>
</td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1"
runat="server"></asp:ContentPlaceHolder>
</td>
</tr>
</table>
<div id="Footer" style="text-align: center; height: 15px; font-weight: bold; color: black; border-
radius: 8px; border: ridge; background: rgba(255,255,255,0.5); line-height: 15px; font-size:
15PX;">Copyright © AirTicket Reservation System </div>
</form>
</body>
</html>
MainSite.Master.cs
namespace Airways
{
protected void Page_Load(object sender, EventArgs e)
try
Label_UName.Text = Session["User_Name"].ToString();
// Input
//Output
int Cus_ID;
string CusMail;
string CusDOB;
string CusAddress;
string CusPhone;
string CusGender;
string Bal_Amount;
Session["CusID"] = Cus_ID;
Session["CusMail"] = CusMail;
Session["CusDOB"] = CusDOB;
Session["CusAdrs"] = CusAddress;
Session["CusPhone"] = CusPhone;
Session["CusGender"] = CusGender;
Session["Bal"] = Bal_Amount;
}
writer.WriteLine(Environment.NewLine +
"-----------------------------------------------------------------------------" + Environment.NewLine);
}
}