protected void Btn_insert_Click(object sender, EventArgs e) { CustomerRegestration insertreg = new CustomerRegestration { FirstNAME = tbx_Fname.Text, LastNAME = tbx_Lname.Text, EMAILID = tbx_Email.Text, PHONE = tbx_Phone.Text }; int id = BAL.InsertRegister(insertreg); foreach (ListItem li in chklists.Items) { if (li.Selected) { checkout checkoutdetails = new checkout { Address_id = id, Room_id = Convert.ToInt32(li.Value) }; BAL.InsertRoomsBooked(checkoutdetails); } } Customeraddress insertadd = new Customeraddress { city = tbx_City.Text, state = tbx_State.Text, street = tbx_Street.Text, Address_id = id }; BAL.InsertAddress(insertadd); Response.Redirect("default.aspx?msg=Customer Details inserted successfully."); }
public static void InsertAddress(Customeraddress insertcusadd) { DAL.InsertAddress(insertcusadd); }