protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { Response.Redirect("frmLogin.aspx"); } ClsUserBookings obj = new ClsUserBookings(); if (!IsPostBack) { if (Request["id"] != null) { int i = Convert.ToInt16(Request["id"]); int BookId = Convert.ToInt16(Request["BookingId"]); if (i == 1) { obj.BookingId = BookId; DataSet ds = obj.DisplayCancelBooking(); GridConform.DataSource = ds.Tables [0]; GridConform.DataBind(); } if (i == -1) { LblMessage.Visible = true; LblMessage.Text = "BookingId=" + BookId.ToString() + " Already Cancelled"; } } } }
protected void GridBookingRec_RowCommand(object sender, GridViewCommandEventArgs e) { ClsUserBookings obj1 = new ClsUserBookings(); int id = Convert.ToInt32(e.CommandArgument.ToString()); obj1.UpdateBookingInfo("update tblBookingInfo set BookingStatus=2 where BookingId=" + id); DataSet ds = obj.DisplayConformBookings(); GridBookingRec.DataSource = ds.Tables[0]; GridBookingRec.DataBind(); }