コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             HRSBookingsBLL bookingBLLObject = new HRSBookingsBLL();
             string         customerID       = Session["userId"].ToString();
             var            bookings         = bookingBLLObject.GetBookingID(customerID);
             BookingIDDropDownList.DataSource = bookings;
             BookingIDDropDownList.DataBind();
             hidden.Visible = false;
         }
         if (IsPostBack)
         {
             if (ArrivalDateTextBox.Text != "" && DepartureDateTextbox.Text != "")
             {
                 DateTime arrivalDate   = new DateTime();
                 DateTime departureDate = new DateTime();
                 DateTime.TryParse(ArrivalDateTextBox.Text.ToString(), out arrivalDate);
                 DateTime.TryParse(DepartureDateTextbox.Text.ToString(), out departureDate);
                 int noOfNights = (int)(departureDate - arrivalDate).TotalDays;
                 NoOfNightsTextBox.Text = noOfNights.ToString();
             }
         }
     }
     catch (Exception ex)
     {
         Utility.ExceptionUtility.ExceptionLog(ex);
         throw;
     }
 }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         ExpiryDateTextBox.Attributes["min"] = DateTime.Now.ToString("yyyy-MM-dd");
         HRSBookingsBLL bookingBLLObject = new HRSBookingsBLL();
         string         customerID       = Session["userId"].ToString();
         List <string>  booking          = bookingBLLObject.GetBookingIDForTXN(customerID);
         BookingIDDropDownList.DataSource = booking;
         BookingIDDropDownList.DataBind();
         BookingIDDropDownList.SelectedValue = Request.QueryString["field"];
         hidden.Visible = false;
     }
     catch (Exception ex)
     {
         ExceptionUtility.ExceptionLog(ex);
         throw;
     }
 }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             HRSPaymentsBLL paymentBLLObject = new HRSPaymentsBLL();
             string         customerID       = Session["userId"].ToString();
             var            bookings         = paymentBLLObject.GetTXNBookindID(customerID);
             BookingIDDropDownList.DataSource = bookings;
             BookingIDDropDownList.DataBind();
         }
         hidden2.Visible = false;
     }
     catch (Exception ex)
     {
         Utility.ExceptionUtility.ExceptionLog(ex);
         throw;
     }
 }