protected void Page_Load(object sender, EventArgs e) { TouristServices touristServices = null; AddAttributes(); if (Request.QueryString["bid"] != null) { BookingId = Convert.ToInt32(Request.QueryString["bid"]); } if (Request.QueryString["tno"] != null) { TouristNo = Convert.ToInt32(Request.QueryString["tno"]); } SessionServices.TouristDetails_BookingNo = BookingId; if (SessionServices.TouristDetails_TouristNo > 0) { TouristNo = SessionServices.TouristDetails_TouristNo; touristServices = new TouristServices(); BookingTouristDTO oBTData = touristServices.GetBookingTouristDetails(BookingId, TouristNo); if (oBTData != null) { FillTouristDetails(oBTData); } touristServices = null; oBTData = null; SessionServices.DeleteSession(Constants._TouristDetails_TouristNo); } if (!IsPostBack) { FillNationality(); radEmpNo.Checked = true; if (Request.QueryString["op"] == "edit") { btnSaveTouristDetails.Text = "Update"; if (touristServices == null) { touristServices = new TouristServices(); } BookingTouristDTO oBTData = touristServices.GetBookingTouristDetails(BookingId, TouristNo); if (oBTData != null) { FillTouristDetails(oBTData); } touristServices = null; oBTData = null; } else { btnDelete.Visible = false; } System.Web.UI.ScriptManager.GetCurrent(this).SetFocus(this.ddlSuffix); } }
/* * protected void dgSeries_DeleteCommand(object source, DataGridCommandEventArgs e) * { * int iSeriesId = Convert.ToInt32(dgSeries.DataKeys[e.Item.ItemIndex].ToString()); * clsSeriesManager oSeriesManager; * oSeriesManager = new clsSeriesManager(); * oSeriesManager.DeleteSeries(iSeriesId); * RefreshGrid(); * } * protected void dgSeries_ItemCommand(object source, DataGridCommandEventArgs e) * { * try * { * if (e.Item.ItemIndex >= 0) * { * int iSeriesId = Convert.ToInt32(dgSeries.DataKeys[e.Item.ItemIndex].ToString()); * if (string.Compare(e.CommandName.ToString(), "Edit", true) == 0) * Response.Redirect("SeriesBooking.aspx?sid=" + iSeriesId.ToString()); * } * } * catch (Exception exp) * { * GF.LogError("ViewSeries.dgSeries_ItemCommand", exp.Message); * return; * } * * } */ protected void btnShow_Click(object sender, EventArgs e) { SessionServices.DeleteSession(Constants._ViewBooking_BookingData); if (txtStartDate.Text != "") { SessionServices.ViewSeries_StartSeriesDate = Convert.ToDateTime(txtStartDate.Text.ToString()); } if (ddlAccomName.SelectedIndex != 0) { SessionServices.ViewSeries_SelectedAccomodation = ddlAccomName.SelectedValue; } RefreshGrid(); }
protected void btnDone_Click(object sender, EventArgs e) { if (!base.ValidateIfCommandAllowed(Request.Url.AbsoluteUri, ENums.PageCommand.Update)) { return; } if (string.Compare(ddlTreeType.SelectedItem.Text, "Choose Tree Type", true) == 0) { return; } SetTreeTypeasDefault(GetSelectedTreeType()); SessionServices.DeleteSession(Constants._BookingChart_TreeDTO); SessionServices.DeleteSession(Constants._BookingChart_TreeType); CloseWindow(); }
protected void btnShow_Click(object sender, EventArgs e) { SessionServices.DeleteSession(Constants._TouristCount_BookingData); if (txtStartDate.Text != "") { SessionServices.TouristCount_SelectedCheckInDate = txtStartDate.Text.ToString(); } if (txtEndDate.Text != "") { SessionServices.TouristCount_SelectedCheckOutDate = txtEndDate.Text.ToString(); } if (ddlAccomType.SelectedIndex != 0) { SessionServices.TouristCount_SelectedAccomodationType = ddlAccomType.SelectedValue; } //if (ddlBookingStatusTypes.SelectedIndex != 0) //SessionHandler.TouristCount_SelectedBookingStatus = ddlBookingStatusTypes.SelectedValue; RefreshGrid(); }
private void GridRefresh() { SessionServices.DeleteSession(Constants._ViewBooking_BookingData); if (txtStartDate.Text != "") { SessionServices.ViewBooking_SelectedCheckInDate = txtStartDate.Text.ToString(); } if (txtEndDate.Text != "") { SessionServices.ViewBooking_SelectedCheckOutDate = txtEndDate.Text.ToString(); } if (ddlAccomType.SelectedIndex != 0) { SessionServices.ViewBooking_SelectedAccomodationType = ddlAccomType.SelectedValue; } if (ddlBookingStatusTypes.SelectedIndex != 0) { SessionServices.ViewBooking_SelectedBookingStatus = ddlBookingStatusTypes.SelectedValue; } RefreshGrid(); }