protected void LoadRFPInfo()
    {
        using (clsRFPRequest objRFPRequest = new clsRFPRequest())
        {
            objRFPRequest.ControlNumber = Request.QueryString["ControlNumber"];
            objRFPRequest.Fill();
            txtControlNumber.Text        = objRFPRequest.ControlNumber;
            txtRequestor.Text            = objRFPRequest.PayeeName;
            ddlRequestType.SelectedValue = objRFPRequest.RequestCode;
            txtIntended.Text             = objRFPRequest.RequestFor;
            txtProjectTitle.Text         = objRFPRequest.ProjectTitle;
            txtRFANumber.Text            = objRFPRequest.RFANumber.Trim();
            dtpDateNeeded.Date           = objRFPRequest.DateNeeded;
            txtSupportingDocuments.Text  = objRFPRequest.SupportingDoument;
            txtRemarks.Text = objRFPRequest.Remarks;

            ddlEndorsedBy1.SelectedValue = (objRFPRequest.EndorsedBy1 != "") ? objRFPRequest.EndorsedBy1 : "";
            if (objRFPRequest.EndorsedBy2.Trim() != "")
            {
                trEndorseBy2.Visible         = true;
                btbAddEndorser2.Visible      = false;
                ddlEndorsedBy2.SelectedValue = objRFPRequest.EndorsedBy2;
            }
            ddlAuthorized.SelectedValue = objRFPRequest.AuthorizedBy;
            LoadDetails();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        clsSpeedo.Authenticate();
        if (!Page.IsPostBack)
        {
            MakeCart();
            LoadDDLs();

            using (clsRFPRequest objRFPRequest = new clsRFPRequest())
            {
                objRFPRequest.ControlNumber = Request.QueryString["ControlNumber"];
                objRFPRequest.Fill();

                if (objRFPRequest.Status != "2")
                {
                    Response.Redirect("../../AccessDenied.aspx");
                }

                if (objRFPRequest.EndorsedBy1.Trim() != string.Empty && objRFPRequest.EndorsedBy2.Trim() == string.Empty)
                {
                    if (objRFPRequest.EndorsedStatus1.Trim() == "2")
                    {
                        LoadRFPInfo();
                    }
                    else
                    {
                        Response.Redirect("../../AccessDenied.aspx");
                    }
                }

                if (objRFPRequest.EndorsedBy1.Trim() != string.Empty && objRFPRequest.EndorsedBy2.Trim() != string.Empty)
                {
                    if (objRFPRequest.EndorsedStatus1.Trim() == "2" && objRFPRequest.EndorsedStatus2.Trim() == "2")
                    {
                        LoadRFPInfo();
                    }
                    else
                    {
                        Response.Redirect("../../AccessDenied.aspx");
                    }
                }
                if (objRFPRequest.EndorsedBy1.Trim() == string.Empty && objRFPRequest.EndorsedBy2.Trim() == string.Empty)
                {
                    if (objRFPRequest.AuthorizeStatus.Trim() == "2")
                    {
                        LoadRFPInfo();
                    }
                    else
                    {
                        Response.Redirect("../../AccessDenied.aspx");
                    }
                }
            }
            ValidateRequestForField();
        }
    }
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     using (clsRFPRequest objRequest = new clsRFPRequest())
     {
         objRequest.ControlNumber = Request.QueryString["ControlNumber"];
         objRequest.Fill();
         if (objRequest.Status == "2")
         {
             if (clsRFPRequest.Cancel(objRequest.ControlNumber) > 0)
             {
                 Response.Redirect("RFPMenu.aspx");
             }
         }
     }
 }
Beispiel #4
0
    private void LoadDetails()
    {
        using (clsRFPRequest objRequest = new clsRFPRequest())
        {
            objRequest.ControlNumber = Request.QueryString["ControlNumber"];
            objRequest.Fill();
            lblControlNumber.Text = objRequest.ControlNumber;
            lblPayee.Text         = objRequest.PayeeName;
            lblRequestedBy.Text   = clsEmployee.GetName(objRequest.CreatedBy);
            lblRequestType.Text   = clsRFPRequestType.GetRequestTypeName(objRequest.RequestCode);
            //lblRequestFor.Text = objRequest.RequestFor;
            lblProjectTitle.Text        = objRequest.ProjectTitle;
            lblReferenceRFANo.Text      = objRequest.RFANumber;
            lblDateCheckNeeded.Text     = objRequest.DateNeeded.ToLongDateString().ToString();
            lblDateCreated.Text         = objRequest.CreatedOn.ToLongDateString().ToString();
            lblSupportingDocuments.Text = objRequest.SupportingDoument;
            lblRemarks.Text             = objRequest.Remarks;
            lblEndorsers.Text           = objRequest.EndorsedStatus1 == "1"?clsEmployee.GetName(objRequest.EndorsedBy1):"" + " <br/>" + objRequest.EndorsedStatus2 == "1"?clsEmployee.GetName(objRequest.EndorsedBy2):"";
            if (lblEndorsers.Text.Trim().Length == 0)
            {
                trEndorsers.Visible = false;
            }

            if (objRequest.Status == "1")
            {
                lblStatus.Text = "( Already been approved )"; lblStatus.Visible = true;
            }
            else if (objRequest.Status == "2")
            {
                lblStatus.Text = "( For Approval )";
            }
            else if (objRequest.Status == "3")
            {
                lblStatus.Text = "( Already been cancelled )"; lblStatus.Visible = true;
            }
            else if (objRequest.Status == "M")
            {
                lblStatus.Text = "( Already been tag for manual approval )"; lblStatus.Visible = true;
            }
            else if (objRequest.Status == "0")
            {
            }
            else
            {
                lblStatus.Text = "( Already been disapproved )";
            }
        }
    }
Beispiel #5
0
    private void LoadDetails()
    {
        using (clsRFPRequest objRequest = new clsRFPRequest())
        {
            string strStatus = "";
            objRequest.ControlNumber = Request.QueryString["ControlNumber"];
            objRequest.Fill();
            lblControlNumber.Text       = objRequest.ControlNumber;
            lblPayee.Text               = objRequest.PayeeName;
            lblRequestType.Text         = clsRFPRequestType.GetRequestTypeName(objRequest.RequestCode);
            lblRequestedBy.Text         = clsEmployee.GetName(objRequest.CreatedBy);
            lblProjectTitle.Text        = objRequest.ProjectTitle;
            lblReferenceRFANo.Text      = objRequest.RFANumber;
            lblDateCheckNeeded.Text     = objRequest.DateNeeded.ToLongDateString().ToString();
            lblDateCreated.Text         = objRequest.CreatedOn.ToLongDateString().ToString();
            lblSupportingDocuments.Text = objRequest.SupportingDoument;
            lblRemarks.Text             = objRequest.Remarks;

            if (objRequest.Status == "1")
            {
                lblStatus.Text = "( Approved )";
                if (objRequest.CreatedBy == Request.Cookies["Speedo"]["UserName"])
                {
                    btnPrint.Visible = true;
                }
            }
            if (objRequest.Status == "M")
            {
                lblStatus.Text = "( Manual Approval )";
                if (objRequest.CreatedBy == Request.Cookies["Speedo"]["UserName"])
                {
                    btnPrint.Visible = true;
                }
            }
            if (objRequest.Status == "0")
            {
                lblStatus.Text = "( Disapproved )";
                if (objRequest.CreatedBy == Request.Cookies["Speedo"]["UserName"])
                {
                    btnPrint.Visible = false;
                }
            }
        }
    }