protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(uid) from user_reg"; uid = a.max_id(cmd); cmd.CommandText = "select max(act_no) from account"; act_no = a.max_acct(cmd); } }
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) { 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) { 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) { 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) { 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 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 Button3_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); string fr_date = DropDownList1.Text + "/" + DropDownList2.Text + "/" + DropDownList3.Text; string to_date = DropDownList4.Text + "/" + DropDownList5.Text + "/" + DropDownList6.Text; cmd.CommandText = "select max(bid) from bookingreg"; bid = a.max_id(cmd); if (DropDownList9.Text == "Normal Days") { cmd.CommandText = "insert into bookingreg values('" + bid + "','" + Session["id"] + "','" + DropDownList7.SelectedValue + "','" + fr_date + "','" + to_date + "','" + TextBox4.Text + "','" + DropDownList10.SelectedValue + "','0','pending')"; a.execute(cmd); } else if (DropDownList9.Text == "Sundays") { cmd.CommandText = "insert into bookingreg values('" + bid + "','" + Session["id"] + "','" + DropDownList7.SelectedValue + "','" + fr_date + "','" + fr_date + "','" + TextBox4.Text + "','" + DropDownList10.SelectedValue + "','0','pending')"; a.execute(cmd); } Response.Write("<script>alert('success')</script>)"); TextBox4.Text = ""; TextBox9.Text = ""; DropDownList1.SelectedIndex = -1; DropDownList2.SelectedIndex = -1; DropDownList3.SelectedIndex = -1; DropDownList4.SelectedIndex = -1; DropDownList5.SelectedIndex = -1; DropDownList6.SelectedIndex = -1; DropDownList7.SelectedIndex = -1; DropDownList1.SelectedIndex = -1; DropDownList9.SelectedIndex = -1; MultiView1.SetActiveView(View7); TextBox7.Text = tam.ToString(); }