protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View1); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from complaint where reply='pending'"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from account where uid='" + Session["id"] + "'"; DataTable dt = a.getdata(cmd); if (dt.Rows.Count > 0) { TextBox1.Text = dt.Rows[0][0].ToString(); Label1.Text = dt.Rows[0][2].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View1); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(pgid) from package"; id = a.max_id(cmd); cmd.CommandText = "SELECT package.pgid, auditorium.aname,package.pgid, package.package,package.rate FROM auditorium INNER JOIN package ON auditorium.aid = package.pgid "; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView2.SetActiveView(View11); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max_id(tid) from amount"; id = a.max_id(cmd); cmd.CommandText = "select aname from auditorium where aid=" + Session["id"] + ""; DataTable dt = a.getdata(cmd); cmd.CommandText = "select * from amount"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SELECT bookingreg.bid, user_reg.name, bookingreg.fr_date, bookingreg.to_date, bookingreg.time, package.package, bookingreg.total_amt FROM bookingreg INNER JOIN user_reg ON bookingreg.uid = user_reg.uid INNER JOIN package ON bookingreg.pkg_id = package.pgid and bookingreg.aid=" + Session["id"] + ""; DataGrid2.DataSource = a.getdata(cmd); DataGrid2.DataBind(); cmd.CommandText = "SELECT hour_booking.hid, user_reg.name, hour_booking.date, hour_booking.start_time, hour_booking.end_time, hour_booking.amount FROM hour_booking INNER JOIN user_reg ON hour_booking.uid = user_reg.uid and hour_booking.aid=" + Session["id"] + ""; DataGrid3.DataSource = a.getdata(cmd); DataGrid3.DataBind(); MultiView1.SetActiveView(View1); } }
protected void Button2_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from login where username='******' and password='******'"; DataTable dt = a.getdata(cmd); if (dt.Rows.Count > 0) { Session["id"] = dt.Rows[0][0]; string type = dt.Rows[0][3].ToString(); if (type == "admin") { Response.Redirect("A_home.aspx"); } else if (type == "auditorium") { Response.Redirect("AM_home.aspx"); } else { Response.Redirect("U_home.aspx"); } } else { Response.Write("<script>alert('Invalid user name and password')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View2); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(aid) from auditorium"; TextBox1.Text = a.max_id(cmd).ToString(); cmd.CommandText = "select * from auditorium"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); cmd.CommandText = "select max(act_no) from account"; act_no = a.max_acct(cmd); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from bookingreg where status='cancelled'"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View2); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(fid) from facility"; id = a.max_id(cmd); cmd.CommandText = "select aname from auditorium where aid=" + Session["id"] + ""; DataTable dt = a.getdata(cmd); if (dt.Rows.Count > 0) { TextBox1.Text = dt.Rows[0][0].ToString(); } cmd.CommandText = "SELECT facility.fid, auditorium.aname, facility.facility FROM auditorium INNER JOIN facility ON auditorium.aid = facility.aid "; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View1); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SELECT distinct a.aname, a.aid FROM auditorium AS a INNER JOIN bookingreg AS b ON a.aid = b.aid"; DropDownList1.DataSource = a.getdata(cmd); DropDownList1.DataTextField = "aname"; DropDownList1.DataValueField = "aid"; DropDownList1.DataBind(); DropDownList1.Items.Insert(0, "--select--"); TextBox2.Text = System.DateTime.Now.ToShortDateString(); cmd.CommandText = "select max(cid) from complaint"; cid = a.max_id(cmd); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(rid) from rating"; id = a.max_id(cmd); cmd.CommandText = "SELECT auditorium.aid,auditorium.aname, auditorium.location, auditorium.cont_no, auditorium.email, auditorium.image, rating.rating FROM auditorium INNER JOIN rating ON auditorium.aid = rating.aid "; DataGrid3.DataSource = a.getdata(cmd); DataGrid3.DataBind(); MultiView1.SetActiveView(View10); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View1); Label1.Text = Session["id"].ToString(); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(aid) from auditorium"; TextBox1.Text = Label1.Text;// a.max_id(cmd).ToString(); cmd.CommandText = "select * from auditorium where aid=" + Label1.Text; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select distinct location from auditorium "; DropDownList2.DataSource = a.getdata(cmd); DropDownList2.DataTextField = "location"; DropDownList2.DataValueField = "location"; DropDownList2.DataBind(); DropDownList2.Items.Insert(0, "--select--"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View2); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from auditorium "; DropDownList2.DataSource = a.getdata(cmd); DropDownList2.DataTextField = "aname"; DropDownList2.DataValueField = "aid"; DropDownList2.DataBind(); DropDownList2.Items.Insert(0, "--select--"); DropDownList4.Items.Insert(0, "Month"); for (int i = 1; i <= 12; i++) { DropDownList4.Items.Add(i.ToString()); } DropDownList5.Items.Insert(0, "Year"); for (int i = 2018; i <= 2050; i++) { DropDownList5.Items.Add(i.ToString()); } DropDownList6.Items.Insert(0, "Day"); for (int i = 1; i <= 31; i++) { DropDownList6.Items.Add(i.ToString()); } cmd.CommandText = "SELECT auditorium.aname, hour_booking.date, hour_booking.start_time, hour_booking.end_time, hour_booking.amount FROM hour_booking INNER JOIN auditorium ON hour_booking.aid = auditorium.aid where hour_booking.uid='" + Session["id"] + "'"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); cmd.CommandText = "select max(hid) from hour_booking"; hid = a.max_id(cmd); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MultiView1.SetActiveView(View2); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from auditorium "; DropDownList7.DataSource = a.getdata(cmd); DropDownList7.DataTextField = "aname"; DropDownList7.DataValueField = "aid"; DropDownList7.DataBind(); DropDownList7.Items.Insert(0, "--select--"); for (int i = 1; i <= 31; i++) { DropDownList1.Items.Add(i.ToString()); } DropDownList1.Items.Insert(0, "Day"); for (int i = 1; i <= 12; i++) { DropDownList2.Items.Add(i.ToString()); } DropDownList2.Items.Insert(0, "Month"); for (int i = 2018; i <= 2050; i++) { DropDownList3.Items.Add(i.ToString()); } DropDownList3.Items.Insert(0, "Year"); for (int i = 1; i <= 31; i++) { DropDownList4.Items.Add(i.ToString()); } DropDownList4.Items.Insert(0, "Day"); for (int i = 1; i <= 12; i++) { DropDownList5.Items.Add(i.ToString()); } DropDownList5.Items.Insert(0, "Month"); for (int i = 2018; i <= 2050; i++) { DropDownList6.Items.Add(i.ToString()); } DropDownList6.Items.Insert(0, "Year"); cmd.CommandText = "select * from bookingreg where uid=" + Session["id"] + " and status='pending'"; DataGrid2.DataSource = a.getdata(cmd); DataGrid2.DataBind(); } }