public void ClickReservationsDelete(int x) { this.Bord[x].Click += delegate(object s, EventArgs e) { this.lambdaReservations = new LambdaReservations(Convert.ToInt32(this.Bord[x].CommandName)); if (lambdaReservations.GetCheckDatabaseRowID()) lambdaReservations.SetDeleteReservationRowById(); }; }
// For Deleting Slots In Reservation Page. public void ClickReservationsDelete(int x) { this.Bord[x].Click += delegate(object s, EventArgs e) { this.lambdaReservations = new LambdaReservations(Convert.ToInt32(this.Bord[x].CommandName)); this.lambdaSlots = new LambdaSlots(this.lambdaReservations.Id); HttpContext.Current.Session.Add(SessionEnum.SessionNames.SlotsID.ToString(), Convert.ToInt32(this.Bord[x].CommandName)); while (lambdaReservations.GetCheckReservationId()) { lambdaReservations.SetDeleteReservationRowById(); this.lambdaSlots.SetSlotsUpdateDataCountUp(); } HttpContext.Current.Response.Redirect(RESERVATION_PAGE); }; }