Ejemplo n.º 1
0
    protected void GetTravelReqeustByID()
    {
        BLL_TRV_TravelRequest treq = new BLL_TRV_TravelRequest();

        try
        {
            ViewState["CurrentStatus"] = treq.GetCurrentStatus(RequestID, AgentID).ToString().ToUpper();
            if (Convert.ToString(ViewState["CurrentStatus"]) == "CLOSED")
            {
                Response.Write("<center style='color:red;'>Travel request has been close...</center>");
                Response.End();
            }

            if (Convert.ToString(ViewState["CurrentStatus"]) == "NA")
            {
                Response.Write("<center style='color:red;'>Unkonwn request status, please contact XT...</center>");
                Response.End();
            }

            if (Convert.ToString(ViewState["CurrentStatus"]) == "QUOTE RECEIVED" || Convert.ToString(ViewState["CurrentStatus"]) == "NEW" || Convert.ToString(ViewState["CurrentStatus"]) == "RFQ SENT")
            {
                btnAddQuotation.Enabled = true;
            }
            else
            {
                btnAddQuotation.Enabled = false;
            }

            DataSet ds = new DataSet();
            objRequestFlights.SelectParameters["RequestID"].DefaultValue = RequestID.ToString();

            ds = treq.GetTravelRequestByID(RequestID, 1);

            lblRequestorName.Text   = ds.Tables[0].Rows[0]["created_By"].ToString();
            lblRequestorEmail.Text  = ds.Tables[0].Rows[0]["MailID"].ToString();
            lblRequestorMobile.Text = ds.Tables[0].Rows[0]["Mobile_Number"].ToString();

            hdf_CompanyName.Value = ds.Tables[0].Rows[0]["Company_Name"].ToString();

            lblSeamanStatus.Text      = ds.Tables[0].Rows[0]["isSeaman"].ToString() == "Y" ? "SEAMAN TICKET" : "NOT A SEAMAN TICKET";
            lblSeamanStatus.ForeColor = ds.Tables[0].Rows[0]["isSeaman"].ToString() == "Y" ? System.Drawing.Color.Blue : System.Drawing.Color.Red;
            hdfIsSeaman.Value         = ds.Tables[0].Rows[0]["isSeaman"].ToString();
            rptRequest.DataSource     = ds;
            rptRequest.DataBind();

            rptPax.DataSource = ds.Tables[1];
            rptPax.DataBind();
        }
        catch { }
        finally { treq = null; }
    }
Ejemplo n.º 2
0
    protected void GetTravelRequestDetails()
    {
        BLL_TRV_TravelRequest treq = new BLL_TRV_TravelRequest();

        try
        {
            DataSet ds = new DataSet();
            ds = treq.GetTravelRequestByID(requestID, 0);
            lblSeamanStatus.Text      = ds.Tables[0].Rows[0]["isSeaman"].ToString() == "Y" ? "SEAMAN TICKET" : "NOT A SEAMAN TICKET";
            lblSeamanStatus.ForeColor = ds.Tables[0].Rows[0]["isSeaman"].ToString() == "Y" ? System.Drawing.Color.Blue : System.Drawing.Color.Red;

            rptParent.DataSource = ds;
            rptParent.DataBind();
        }
        catch { }
        finally { treq = null; }
    }
Ejemplo n.º 3
0
    protected void BindRequest()
    {
        try
        {
            BLL_TRV_TravelRequest treq = new BLL_TRV_TravelRequest();
            DataSet ds = new DataSet();
            ds = treq.GetTravelRequestByID(RequestID, 0);
            rptParent.DataSource = ds;
            rptParent.DataBind();

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["CurrentStatus"].ToString().ToUpper() == "APPROVED" || ds.Tables[0].Rows[0]["CurrentStatus"].ToString().ToUpper() == "REFUND PENDING")
                {
                    cdmSend.Visible = false;
                }
            }
        }
        catch { }
    }