protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into auditorium values(" + TextBox1.Text + ",'" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','pending','pending','pending')"; a.execute(cmd); Random rd = new Random(); string psw = rd.Next(100000, 900000).ToString(); cmd.CommandText = "insert into login values('" + TextBox1.Text + "','" + TextBox5.Text + "','" + psw + "','auditorium')"; a.execute(cmd); sm.sendmail(TextBox5.Text, psw, "Your Password"); cmd.CommandText = "insert into account values(" + act_no + ",'" + TextBox1.Text + "','pending','audi')"; a.execute(cmd); Response.Write("<script>alert('success')</script>"); cmd.CommandText = "select max(aid) from auditorium"; TextBox1.Text = a.max_id(cmd).ToString(); cmd.CommandText = "select max(act_no) from account"; act_no = a.max_acct(cmd); TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; }
/* protected void MultiView2_ActiveViewChanged(object sender, EventArgs e) * { * * }*/ protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into amount values('" + id + "','" + Session["id"] + "','" + DropDownList1.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "')"; a.execute(cmd); MultiView2.SetActiveView(View11); }
protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into facility values('" + id + "','" + Session["id"] + "','" + DropDownList1.Text + "','" + TextBox2.Text + "')"; a.execute(cmd); Response.Write("<script>alert('success')</script>)"); }
protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into package values('" + id + "','" + Session["id"] + "','" + DropDownList2.Text + "','" + TextBox5.Text + "')"; a.execute(cmd); Response.Write("<script>alert('success')</script>)"); cmd.CommandText = "select max(pgid) from package"; id = a.max_id(cmd); MultiView1.SetActiveView(View1); 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 Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into rating values('" + id + "','" + Session["id"] + "','" + Label1.Text + "','" + TextBox1.Text + "')"; a.execute(cmd); Response.Write("<script>alert('success')</script>"); MultiView1.SetActiveView(View9); }
protected void Button2_Click(object sender, EventArgs e) { MultiView1.SetActiveView(View2); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "update auditorium set aname='" + TextBox1.Text + "',location='" + TextBox2.Text + "',address='" + TextBox3.Text + "',cont_no='" + TextBox4.Text + "',email='" + TextBox5.Text + "',image='" + path + "' where aid=" + Label1.Text + ""; a.execute(cmd); Response.Write("<script>alert('successful')</script>"); }
protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "update complaint set reply='" + TextBox3.Text + "' where cid='" + cid + "'"; a.execute(cmd); MultiView1.SetActiveView(View1); cmd.CommandText = "select * from complaint where reply='pending'"; DataGrid1.DataSource = a.getdata(cmd); DataGrid1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { if (Convert.ToInt32(Label1.Text) > 4) { Response.Write("<script>alert('minimum hour is 4 hour,so booking your normal booking ')</script>"); } else { string date = DropDownList6.Text + "/" + DropDownList4.Text + "/" + DropDownList5.Text; SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into hour_booking values('" + hid + "','" + DropDownList2.SelectedValue + "','" + Session["id"] + "','" + date + "','" + TextBox2.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "')"; a.execute(cmd); cmd.CommandText = "select wallet from account where uid='" + Session["id"] + "' and u_type='user'"; DataTable dt = a.getdata(cmd); int amt_wlt = Convert.ToInt32(dt.Rows[0][0].ToString()); if (Convert.ToInt32(TextBox5.Text) < amt_wlt) { int bal = amt_wlt - Convert.ToInt32(TextBox5.Text); cmd.CommandText = "update account set wallet='" + bal + "' where uid='" + Session["id"] + "' and u_type='user'"; a.execute(cmd); cmd.CommandText = "select wallet from account where uid='" + DropDownList2.SelectedValue + "' and u_type='audi'"; DataTable dt1 = a.getdata(cmd); int dt1_w = Convert.ToInt32(dt1.Rows[0][0].ToString()); int tt_w = dt1_w + Convert.ToInt32(TextBox5.Text); cmd.CommandText = "update account set wallet='" + tt_w + "' where uid='" + DropDownList2.SelectedValue + "' and u_type='audi'"; a.execute(cmd); } else { Response.Write("<script>alert('Your account balance is low')</script>"); } Response.Write("<script>alert('success')</script>)"); } }
protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select max(cid) from complaint"; cid = a.max_id(cmd); cmd.CommandText = "insert into complaint values('" + cid + "','" + Session["id"] + "','" + DropDownList1.SelectedValue + "','" + TextBox2.Text + "','" + TextBox1.Text + "','pending')"; a.execute(cmd); Response.Write("<script>alert('success')</script>"); DropDownList1.SelectedIndex = -1; TextBox1.Text = ""; TextBox2.Text = ""; }
protected void Button1_Click(object sender, EventArgs e) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "insert into user_reg values('" + uid + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + RadioButtonList1.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "')"; a.execute(cmd); cmd.CommandText = "insert into login values('" + uid + "','" + TextBox7.Text + "','" + TextBox8.Text + "','user')"; a.execute(cmd); cmd.CommandText = "insert into account values('" + act_no + "','" + uid + "','pending','user')"; a.execute(cmd); Response.Write("<script>alert('success')</script>"); cmd.CommandText = "select max(uid) from user_reg"; Label1.Text = a.max_id(cmd).ToString(); TextBox1.Text = ""; TextBox2.Text = ""; RadioButtonList1.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; TextBox7.Text = ""; TextBox8.Text = ""; }
protected void Button1_Click(object sender, EventArgs e) { int wlt = Convert.ToInt32(Label1.Text) + Convert.ToInt32(TextBox2.Text); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "update account set wallet='" + wlt + "' where uid='" + Session["id"] + "' and u_type='user'"; a.execute(cmd); cmd.CommandText = "select wallet from account where uid='" + Session["id"] + "' and u_type='user'"; DataTable dt = a.getdata(cmd); if (dt.Rows.Count > 0) { Label1.Text = dt.Rows[0][0].ToString(); } Response.Write("<script>alert('success')</script>"); }
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(); }