protected void Button1_Click(object sender, EventArgs e) { if (Literal1.Text == "") { data1 dc = new data1(); var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; wedding_booking obj = new wedding_booking(); obj.booking_id = Convert.ToInt32(data.First().BookingId); obj.bridename = TextBox2.Text; obj.groomname = TextBox3.Text; obj.date = TextBox6.Text; obj.email = TextBox5.Text; obj.mobile = TextBox4.Text; obj.wedding_id = HiddenField1.Value; obj.time = DropDownList1.SelectedValue; obj.Status = "Booked"; dc.wedding_bookings.InsertOnSubmit(obj); data.First().BookingId = data.First().BookingId + 1; dc.SubmitChanges(); Session["bid"] = obj.booking_id; Session["amnt"] = Label2.Text; Session["date"] = TextBox6.Text; Session["time"] = DropDownList1.SelectedValue; Response.Redirect("~/Payment For.aspx"); } }
protected void Button2_Click(object sender, EventArgs e) { MultiView1.ActiveViewIndex = -1; data1 dc = new data1(); var data = from tmp in dc.room_bookings where tmp.booking_id == Convert.ToInt64(TextBox1.Text) select tmp; if (data.Count() != 0) { data.First().Status = "Cancelled"; dc.SubmitChanges(); goto z; } var data1 = from tmp in dc.spa_bookings where tmp.booking_id == Convert.ToInt64(TextBox1.Text) select tmp; if (data1.Count() != 0) { data1.First().Status = "Cancelled"; dc.SubmitChanges(); goto z; } var data2 = from tmp in dc.ResturantBookingTables where tmp.booking_id == Convert.ToInt64(TextBox1.Text) select tmp; if (data2.Count() != 0) { data2.First().Status = "Cancelled"; dc.SubmitChanges(); goto z; } var data3 = from tmp in dc.wedding_bookings where tmp.booking_id == Convert.ToInt64(TextBox1.Text) select tmp; if (data3.Count() != 0) { data3.First().Status = "Cancelled"; dc.SubmitChanges(); goto z; } var data4 = from tmp in dc.MeetingBookingTables where tmp.booking_id == Convert.ToInt64(TextBox1.Text) select tmp; if (data4.Count() != 0) { data4.First().Status = "Cancelled"; dc.SubmitChanges(); goto z; } var data5 = from tmp in dc.PackageBookingTables where tmp.booking_id == Convert.ToInt64(TextBox1.Text) select tmp; if (data5.Count() != 0) { data5.First().Status = "Cancelled"; dc.SubmitChanges(); goto z; } Literal1.Text = "Please Check Your Booking No"; goto x; z : dc.SubmitChanges(); MultiView1.ActiveViewIndex = 1; x : TextBox1.Focus(); }
protected void Button1_Click(object sender, EventArgs e) { data1 dc = new data1(); var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; spagallery obj = new spagallery(); obj.spaid = Convert.ToInt16(DropDownList1.Text); obj.image = "~/images/spa/" + data.First().ImageId + ".jpj"; obj.caption = TextBox1.Text; dc.spagalleries.InsertOnSubmit(obj); data.First().ImageId = data.First().ImageId + 1; FileUpload1.SaveAs(Server.MapPath(obj.image)); dc.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { data1 dc = new data1(); var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; room_gallery_table obj = new room_gallery_table(); obj.roomid = Convert.ToInt16(DropDownList1.SelectedValue); obj.image = "~/Images/Room/" + data.First().ImageId + ".jpg"; obj.caption = TextBox3.Text; dc.room_gallery_tables.InsertOnSubmit(obj); data.First().ImageId = data.First().ImageId + 1; FileUpload1.SaveAs(Server.MapPath(obj.image)); dc.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { data1 dc = new data1(); var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; room_table obj = new room_table(); obj.roomtype = TextBox5.Text; obj.description = TextBox3.Text; obj.image = "~/Images/Room/" + data.First().ImageId + ".jpg"; obj.roomrent = TextBox4.Text; dc.room_tables.InsertOnSubmit(obj); data.First().ImageId = data.First().ImageId + 1; FileUpload1.SaveAs(Server.MapPath(obj.image)); dc.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { data1 dc = new data1(); var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; spatharapy obj = new spatharapy(); obj.spatype = TextBox1.Text; obj.description = TextBox2.Text; obj.priceofspa = TextBox4.Text; obj.image = "~/images/spa/" + data.First().ImageId + ".jpj"; data.First().ImageId = data.First().ImageId + 1; dc.spatharapies.InsertOnSubmit(obj); FileUpload1.SaveAs(Server.MapPath(obj.image)); dc.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { data1 dc = new data1(); var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; wedding_type obj = new wedding_type(); obj.weddingtype = TextBox1.Text; obj.description1 = TextBox2.Text; obj.description2 = TextBox3.Text; obj.priceforveg = TextBox4.Text; obj.pricefornonveg = TextBox5.Text; obj.pricewithalcohol = TextBox6.Text; obj.image = "~/Images/Wedding/" + data.First().ImageId + ".jpg"; dc.wedding_types.InsertOnSubmit(obj); data.First().ImageId = data.First().ImageId + 1; dc.SubmitChanges(); }
protected void Button1_Click(object sender, EventArgs e) { if (Literal1.Text == "") { data1 dc = new data1(); payment obj = new payment(); obj.amount = Convert.ToInt32(Label2.Text); obj.booking_id = Convert.ToInt32(Label1.Text); obj.cardnumber = Convert.ToDecimal(TextBox1.Text); obj.cardtype = DropDownList1.SelectedValue; obj.expdate = TextBox3.Text; obj.nameoncard = TextBox2.Text; dc.payments.InsertOnSubmit(obj); dc.SubmitChanges(); MultiView1.ActiveViewIndex = 1; Label3.Text = Session["bid"].ToString(); Label4.Text = Session["date"].ToString(); Label5.Text = Session["time"].ToString(); } }
protected void Button1_Click(object sender, EventArgs e) { if (Literal1.Text == "") { data1 dc = new data1(); var data1 = from tmp in dc.room_bookings where tmp.date == TextBox1.Text select tmp; if (data1.Count() <= 20) { var data = from tmp in dc.SystemTables where tmp.id == 1 select tmp; room_booking obj = new room_booking(); obj.booking_id = Convert.ToInt32(data.First().BookingId); obj.age = Convert.ToInt16(TextBox5.Text); obj.city = TextBox6.Text; obj.date = TextBox1.Text; obj.email_id = TextBox4.Text; obj.gender = RadioButtonList1.SelectedValue; obj.mobile = Convert.ToDecimal(TextBox3.Text); obj.name = TextBox2.Text; obj.noofperson = Convert.ToInt16(DropDownList2.Text); obj.noofrooms = Convert.ToInt16(DropDownList1.SelectedValue); obj.room_id = Convert.ToInt32(HiddenField1.Value); obj.time = DropDownList3.SelectedValue; obj.idproof = "~/IdProof/" + obj.booking_id + ".jpg"; obj.Status = "Booked"; dc.room_bookings.InsertOnSubmit(obj); data.First().BookingId = data.First().BookingId + 1; FileUpload1.SaveAs(Server.MapPath(obj.idproof)); dc.SubmitChanges(); Session["bid"] = obj.booking_id; Session["amnt"] = Label4.Text; Session["date"] = TextBox1.Text; Session["time"] = DropDownList3.SelectedValue; Response.Redirect("~/Payment For.aspx"); } else { Literal1.Text = "Booking Full For The Selected Date, Kindly Choose Another Date"; } } }