Esempio n. 1
0
    private void BindBookings(string FileNo)
    {
        try
        {
            DataSet objDs = _objBALFileManager.GetAllBookingsByFileNo(FileNo);
            if (objDs.Tables[0].Rows.Count > 0)
            {
                gdvFlightBookings.DataSource = objDs;
                gdvFlightBookings.DataBind();
            }
            else
            {
                gdvFlightBookings.DataSource = null;
                gdvFlightBookings.DataBind();
            }

            if (objDs.Tables[1].Rows.Count > 0)
            {
                gdvHotelBooking.DataSource = objDs.Tables[1];
                gdvHotelBooking.DataBind();
            }
            else
            {
                gdvHotelBooking.DataSource = null;
                gdvHotelBooking.DataBind();
            }
        }
        catch (Exception ex)
        {
            lblMsg.Text = ex.Message;
        }
    }
Esempio n. 2
0
    private void BindBookings(int CreatedBy)
    {
        try
        {
            DataSet objDsLatestFile = objBALFileManager.GetLatestFileNo(CreatedBy);
            string  FileNo          = string.Empty;
            if (objDsLatestFile.Tables[0].Rows.Count > 0)
            {
                FileNo = objDsLatestFile.Tables[0].Rows[0]["FileNo"].ToString();
                lblLatestFileNo.Text = FileNo;
                lblOrderNo.Text      = objDsLatestFile.Tables[0].Rows[0]["OrderNo"].ToString();
                hfTravellerId.Value  = objDsLatestFile.Tables[0].Rows[0]["TravellerId"].ToString();
                hfFileNo.Value       = objDsLatestFile.Tables[0].Rows[0]["FileNo"].ToString();

                DataSet objDs = objBALFileManager.GetAllBookingsByFileNo(FileNo);
                if (objDs.Tables[0].Rows.Count > 0)
                {
                    gdvFlightBookings.DataSource = objDs;
                    gdvFlightBookings.DataBind();
                }
                else
                {
                    gdvFlightBookings.DataSource = null;
                    gdvFlightBookings.DataBind();
                }

                if (objDs.Tables[1].Rows.Count > 0)
                {
                    gdvHotelBooking.DataSource = objDs.Tables[1];
                    gdvHotelBooking.DataBind();
                }
                else
                {
                    gdvHotelBooking.DataSource = null;
                    gdvHotelBooking.DataBind();
                }
                if (objDs.Tables[2].Rows.Count > 0)
                {
                    txttotalAmount.Text = (Convert.ToDecimal(objDs.Tables[2].Rows[0]["TotalAmount"].ToString()) + 5000).ToString();
                }
                if (objDs.Tables[3].Rows.Count > 0)
                {
                    txtReceivedAmount.Text = objDs.Tables[3].Rows[0]["ResivedAmount"].ToString();
                }
            }
            else
            {
                btnGenerateOtherBookings.Enabled = false;
            }

            GenerateCars(FileNo);
        }
        catch (Exception ex)
        {
            lblMsg.Text = ex.Message;
        }
    }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["loginId"] == null)
     {
         Response.Redirect("~/Login.aspx");
     }
     if (Request.QueryString["FileNo"] != null)
     {
         strFileNo = Request.QueryString["FileNo"];
     }
     if (!IsPostBack)
     {
         DataSet objds = objBALFileManager.GetAllBookingsByFileNo(strFileNo);
         if (objds.Tables[0].Rows.Count > 0)
         {
             txtFileNo.Text        = strFileNo;
             txtPassengerName.Text = objds.Tables[0].Rows[0]["PaxName"].ToString();
             BindGridview();
         }
     }
 }