protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         using (clsPCASRequest objPCASRequest = new clsPCASRequest())
         {
             objPCASRequest.PCASCode = Request.QueryString["pcascode"].ToString();
             objPCASRequest.Fill();
             lblPCASCode.Text        = Request.QueryString["pcascode"].ToString();
             lblReason.Text          = objPCASRequest.Reason;
             lblRequestor.Text       = clsEmployee.GetName(objPCASRequest.CreatedBy);
             lblPayeeName.Text       = clsEmployee.GetName(objPCASRequest.RequestedBy);
             lblDataFundsNeeded.Text = objPCASRequest.DateNeeded.ToString("MM/dd/yyyy");
             lblClassification.Text  = clsPCASClassfication.GetName(objPCASRequest.Classification);
             lblFiledOB.Text         = objPCASRequest.OBCode.ToString().Trim().Length == 0 ? "Not Applicable" : objPCASRequest.OBCode;
             lblChargeType.Text      = clsPCASChargeType.GetName(objPCASRequest.ChargeTypeCode);
             if (objPCASRequest.ChargeTypeCode == "1")
             {
                 lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
             }
             else if (objPCASRequest.ChargeTypeCode == "2")
             {
                 lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
             }
             else if (objPCASRequest.ChargeTypeCode == "3")
             {
                 lblChargeTo.Text = clsDepartment.GetName(objPCASRequest.SchoolCode);
             }
             lblRemarks.Text = objPCASRequest.Remarks;
         }
     }
 }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            using (clsPCASRequest objPCASRequest = new clsPCASRequest())
            {
                objPCASRequest.PCASCode = Request.QueryString["pcascode"].ToString();
                objPCASRequest.Fill();
                lblPCASCode.Text        = Request.QueryString["pcascode"].ToString();
                lblReason.Text          = objPCASRequest.Reason;
                lblRequestor.Text       = clsEmployee.GetName(objPCASRequest.CreatedBy);
                lblPayeeName.Text       = clsEmployee.GetName(objPCASRequest.RequestedBy);
                lblDataFundsNeeded.Text = objPCASRequest.DateNeeded.ToString("MM/dd/yyyy");
                lblClassification.Text  = clsPCASClassfication.GetName(objPCASRequest.Classification);
                lblFiledOB.Text         = objPCASRequest.OBCode.ToString().Trim().Length == 0 ? "Not Applicable" : objPCASRequest.OBCode;
                lblChargeType.Text      = clsPCASChargeType.GetName(objPCASRequest.ChargeTypeCode);
                if (objPCASRequest.ChargeTypeCode == "1")
                {
                    lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "2")
                {
                    lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "3")
                {
                    lblChargeTo.Text = clsDepartment.GetName(objPCASRequest.SchoolCode);
                }
                lblRemarks.Text = objPCASRequest.Remarks;
                //lblCashier.Text=clsEmployee.GetName(clsPCASRequestCustodian.GetUsername(Request.QueryString["pcascode"].ToString()));
                lblApprover.Text = clsPCASApproval.GetNextApproverUserName(Request.QueryString["pcascode"].ToString());

                ddlAssignedCustodian.DataSource     = clsPCASCustodianFPC.GetDSL();
                ddlAssignedCustodian.DataValueField = "pvalue";
                ddlAssignedCustodian.DataTextField  = "ptext";
                ddlAssignedCustodian.DataBind();

                try
                {
                    ddlAssignedCustodian.SelectedValue = clsPCASRequestCustodian.GetUsername(Request.QueryString["pcascode"].ToString());
                }
                catch
                { }

                ddlFinalApprover.DataSource     = clsModuleApprover.GetDSLFinanceApprover("PETTYFPC3", "3");
                ddlFinalApprover.DataValueField = "pvalue";
                ddlFinalApprover.DataTextField  = "ptext";
                ddlFinalApprover.DataBind();

                try
                {
                    ddlFinalApprover.SelectedValue = clsPCASApproval.GetFinalFPCApproverUserName(Request.QueryString["pcascode"].ToString());
                }
                catch
                { }
            }
        }
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            using (clsPCASRequest objPCASRequest = new clsPCASRequest())
            {
                objPCASRequest.PCASCode = Request.QueryString["pcascode"].ToString();
                objPCASRequest.Fill();
                lblPCASCode.Text        = Request.QueryString["pcascode"].ToString();
                lblReason.Text          = objPCASRequest.Reason;
                lblRequestor.Text       = clsEmployee.GetName(objPCASRequest.CreatedBy);
                lblPayeeName.Text       = clsEmployee.GetName(objPCASRequest.RequestedBy);
                lblDataFundsNeeded.Text = objPCASRequest.DateNeeded.ToString("MM/dd/yyyy");
                lblClassification.Text  = clsPCASClassfication.GetName(objPCASRequest.Classification);
                lblFiledOB.Text         = objPCASRequest.OBCode.ToString().Trim().Length == 0 ? "Not Applicable" : objPCASRequest.OBCode;
                lblChargeType.Text      = clsPCASChargeType.GetName(objPCASRequest.ChargeTypeCode);
                if (objPCASRequest.ChargeTypeCode == "1")
                {
                    lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "2")
                {
                    lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "3")
                {
                    //lblChargeTo.Text = clsDepartment.GetName(objPCASRequest.SchoolCode);
                    lblChargeTo.Text = clsSchool.GetSchoolName(objPCASRequest.SchoolCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "4")
                {
                    lblChargeTo.Text = objPCASRequest.Others;
                }
            }

            if (clsPCASRequest.GetPCASStatus(Request.QueryString["pcascode"].ToString()) == "A" && clsPCASRequest.GetPCASIsIssued(Request.QueryString["pcascode"].ToString()) == "F")
            {
                btnTagasIssued.Visible = false;
                btnTagASReady.Visible  = true;
                btnPrint.Visible       = false;
            }
            else if (clsPCASRequest.GetPCASStatus(Request.QueryString["pcascode"].ToString()) == "A" && clsPCASRequest.GetPCASIsIssued(Request.QueryString["pcascode"].ToString()) == "R")
            {
                btnTagasIssued.Visible = true;
                btnTagASReady.Visible  = false;
                btnPrint.Visible       = false;
            }
            else if (clsPCASRequest.GetPCASStatus(Request.QueryString["pcascode"].ToString()) == "A" && clsPCASRequest.GetPCASIsIssued(Request.QueryString["pcascode"].ToString()) == "I")
            {
                btnTagasIssued.Visible = false;
                btnTagASReady.Visible  = false;
                btnPrint.Visible       = true;
            }

            if (clsPCASRequest.GetPCASIsIssued(Request.QueryString["pcascode"].ToString()) == "F")
            {
                trCustodian.Visible = true;
            }
            else
            {
                trCustodian.Visible = false;
            }
            ddlCustodian.DataSource     = clsPCASCustodianFPC.GetDSL();
            ddlCustodian.DataValueField = "pvalue";
            ddlCustodian.DataTextField  = "ptext";
            ddlCustodian.DataBind();

            try
            {
                ddlCustodian.SelectedValue = clsPCASRequestCustodian.GetUsername(Request.QueryString["pcascode"].ToString());
            }
            catch
            { }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (clsPCASApproval.GetApproverType(Request.Cookies["Speedo"]["UserName"].ToString(), Request.QueryString["pcascode"].ToString()) == "F1" || clsPCASApproval.GetApproverType(Request.Cookies["Speedo"]["UserName"].ToString(), Request.QueryString["pcascode"].ToString()) == "F2" || clsPCASApproval.GetApproverType(Request.Cookies["Speedo"]["UserName"].ToString(), Request.QueryString["pcascode"].ToString()) == "F3")
            {
                trFPC1.Visible             = true;
                trFPC2.Visible             = true;
                trFPC3.Visible             = true;
                trAssignedCashier.Visible  = true;
                btnApprove.Visible         = false;
                btnApprove2.Visible        = false;
                btnSaveAndApprove.Visible  = true;
                btnSaveAndApprove2.Visible = true;
                trFPCD1.Visible            = true;
                trFPCD2.Visible            = true;
                trFPCFinalApprover.Visible = true;
                if (clsPCASApproval.GetApproverType(Request.Cookies["Speedo"]["UserName"].ToString(), Request.QueryString["pcascode"].ToString()) == "F3")
                {
                    ddlFPCFinalApprover.Enabled = false;
                }
            }
            else
            {
                trFPCD1.Visible = false;
                trFPCD2.Visible = false;
            }

            MakeCart();
            using (clsPCASRequest objPCASRequest = new clsPCASRequest())
            {
                objPCASRequest.PCASCode = Request.QueryString["pcascode"].ToString();
                objPCASRequest.Fill();
                lblPCASCode.Text        = Request.QueryString["pcascode"].ToString();
                lblReason.Text          = objPCASRequest.Reason;
                lblRequestor.Text       = clsEmployee.GetName(objPCASRequest.CreatedBy);
                lblPayeeName.Text       = clsEmployee.GetName(objPCASRequest.RequestedBy);
                lblDataFundsNeeded.Text = objPCASRequest.DateNeeded.ToString("MM/dd/yyyy");
                lblClassification.Text  = clsPCASClassfication.GetName(objPCASRequest.Classification);
                lblFiledOB.Text         = objPCASRequest.OBCode.ToString().Trim().Length == 0 ? "Not Applicable" : objPCASRequest.OBCode;
                lblChargeType.Text      = clsPCASChargeType.GetName(objPCASRequest.ChargeTypeCode);
                if (objPCASRequest.ChargeTypeCode == "1")
                {
                    lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "2")
                {
                    lblChargeTo.Text = clsRC.GetRCName(objPCASRequest.RCCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "3")
                {
                    //lblChargeTo.Text = clsDepartment.GetName(objPCASRequest.SchoolCode);
                    lblChargeTo.Text = clsSchool.GetSchoolName(objPCASRequest.SchoolCode);
                }
                else if (objPCASRequest.ChargeTypeCode == "4")
                {
                    lblChargeTo.Text = objPCASRequest.Others;
                }
                lblRemarks.Text         = objPCASRequest.Remarks;
                txtApprovedRFA.Text     = objPCASRequest.ApprovedRFA.ToString();
                txtAmountAllocated.Text = objPCASRequest.AmountAllocated.ToString();
                txtNet.Text             = objPCASRequest.NetAmount.ToString();
                txtRequestAmount.Text   = objPCASRequest.RequestAmount.ToString();
                txtRemainingBudget.Text = objPCASRequest.RemainingBudget.ToString();

                ddlCustodian.DataSource     = clsPCASCustodianFPC.GetDSL();
                ddlCustodian.DataValueField = "pvalue";
                ddlCustodian.DataTextField  = "ptext";
                ddlCustodian.DataBind();

                ddlFPCFinalApprover.DataSource     = clsModuleApprover.GetDSLFinanceApprover("PETTYFPC3", "3");
                ddlFPCFinalApprover.DataValueField = "pvalue";
                ddlFPCFinalApprover.DataTextField  = "ptext";
                ddlFPCFinalApprover.DataBind();

                try
                {
                    ddlCustodian.SelectedValue = clsPCASRequestCustodian.GetUsername(Request.QueryString["pcascode"].ToString());
                }
                catch
                { }

                try
                {
                    ddlFPCFinalApprover.SelectedValue = clsPCASApproval.GetFinalFPCApproverUserName(Request.QueryString["pcascode"].ToString());
                }
                catch
                { }

                ddlSchool.DataSource     = clsFinanceAccountDueFrom.GetDSLAccountDueFrom();
                ddlSchool.DataValueField = "pvalue";
                ddlSchool.DataTextField  = "ptext";
                ddlSchool.DataBind();

                ddlRcCode.DataSource     = clsRC.GetDdlDs();
                ddlRcCode.DataValueField = "pvalue";
                ddlRcCode.DataTextField  = "ptext";
                ddlRcCode.DataBind();

                ddlAccountExpenses.DataSource     = clsFinanceAccountExpenses.GetDSLAccountExpenses();
                ddlAccountExpenses.DataValueField = "pvalue";
                ddlAccountExpenses.DataTextField  = "ptext";
                ddlAccountExpenses.DataBind();

                this.LoadDetails();
            }
        }
    }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        clsSpeedo.Authenticate();
        btnBack.Attributes.Add("onClick", "javascript:history.back(); return false;");
        if (!clsPCASRequest.AuthenticateAccess(Request.Cookies["Speedo"]["UserName"], Request.QueryString["pcascode"].ToString()))
        {
            if (!clsSystemModule.HasAccess("PETTYC", Request.Cookies["Speedo"]["UserName"].ToString()))
            {
                Response.Redirect("~/AccessDenied.aspx");
            }
        }

        clsPCASRequest objPCASRequest = new clsPCASRequest();

        objPCASRequest.PCASCode = Request.QueryString["pcascode"];
        objPCASRequest.Fill();

        if (!Page.IsPostBack)
        {
            if (objPCASRequest.PCASStat != "P")
            {
                if (clsPCASApproval.CountDisapprove(objPCASRequest.PCASCode) == 0)
                {
                    if (clsPCASApproval.CountForApproval(objPCASRequest.PCASCode, "E") == 0)
                    {
                        if (clsPCASApproval.CountForApproval(objPCASRequest.PCASCode, "A") == 0)
                        {
                            //Report
                            CrystalReportViewer1.Height = 600;
                            ConnectionInfo ConnInfo = new ConnectionInfo();
                            {
                                ConnInfo.ServerName   = "hades";
                                ConnInfo.DatabaseName = "MySTIHQ";
                                ConnInfo.UserID       = "usermystihq";
                                ConnInfo.Password     = "******";
                            }

                            foreach (TableLogOnInfo cnInfo in this.CrystalReportViewer1.LogOnInfo)
                            {
                                cnInfo.ConnectionInfo = ConnInfo;
                            }

                            ParameterFields        paramFields = new ParameterFields();
                            ParameterField         paramField  = new ParameterField();
                            ParameterDiscreteValue discreteVal = new ParameterDiscreteValue();

                            paramField.ParameterFieldName = "pcascode";
                            if (Request.QueryString["pcascode"] != null || Request.QueryString["pcascode"] != "")
                            {
                                discreteVal.Value = Request.QueryString["pcascode"];
                            }
                            paramField.CurrentValues.Add(discreteVal);
                            paramFields.Add(paramField);

                            CrystalReportViewer1.ParameterFieldInfo = paramFields;
                            CrystalReportViewer1.PrintMode          = CrystalDecisions.Web.PrintMode.Pdf;
                        }
                        else
                        {
                            Response.Redirect("~/AccessDenied.aspx");
                        }
                    }
                    else
                    {
                        Response.Redirect("~/AccessDenied.aspx");
                    }
                }
                else
                {
                    Response.Redirect("~/AccessDenied.aspx");
                }
            }
            else
            {
                Response.Redirect("~/AccessDenied.aspx");
            }
        }
    }