protected void btnbook_Click1(object sender, EventArgs e) { using (var context = new SRASEntities()) { request_book11 objhall = new request_book11(); objhall.req_ac = txtac.Text; objhall.req_capacity = txtcap.Text; objhall.req_date = txtrdate.Text; objhall.req_dept = txtdep.Text; objhall.req_purpose = txtrdate.Text; objhall.req_resource = txthname.Text; objhall.req_eventdate = txtdate.Text; objhall.req_eventtime = txttime.Text; objhall.req_status = txtstatus.Text; context.request_book11.Add(objhall); context.SaveChanges(); } }
protected void btnsubmit_Click(object sender, EventArgs e) { using (var context = new SRASEntities()) { registration objregister = new registration(); objregister.Reg_Name = txtname.Text; objregister.Reg_Department = txtdept.Text; objregister.Reg_Designation = txtdesig.Text; objregister.Reg_Email = txtemail.Text; objregister.Reg_Contact = txtcontact.Text; objregister.Reg_Password = txtpass.Text; objregister.Reg_Confirm = txtcpass.Text; context.registrations.Add(objregister); context.SaveChanges(); Server.Transfer("home.aspx"); } }