Example #1
0
        protected void SearchAction()
        {
            string sType = Request.QueryString["pType"];

            gvData.DataSource = null;
            gvData.DataBind();

            if (!string.IsNullOrEmpty(sType))
            {
                Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = new DataTable();
                Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

                #region Receive
                if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.RECEIVE).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "SP Receive Approval Queue List";
                    ReceiveDAL      oReceiveDAL = new ReceiveDAL();
                    TemplateBuilder tbGvData    = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Receive' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult   = oReceiveDAL.LoadUnapprovedList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpList = (DataTable)oResult.Return;
                    if (dtTmpList != null)
                    {
                        if (dtTmpList.Rows.Count > 0)
                        {
                            gvData.DataSource = dtTmpList;
                            gvData.DataBind();
                            Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpList;
                        }
                    }
                }
                #endregion Receive

                #region Issue
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "SP Issue Approval Queue List";
                    IssueDAL        oIssueDAL = new IssueDAL();
                    TemplateBuilder tbGvData  = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Issue' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult           = oIssueDAL.LoadUnapprovedList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpCurrencyList = (DataTable)oResult.Return;
                    if (dtTmpCurrencyList != null)
                    {
                        gvData.DataSource = dtTmpCurrencyList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpCurrencyList;
                    }
                }
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE_UPDATE).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "SP Issue Update Approval Queue List";
                    IssueDAL        oIssueDAL = new IssueDAL();
                    TemplateBuilder tbGvData  = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Issue Update' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oIssueDAL.LoadTmpIssueUpdateDataTableList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpIssueUpdateList = (DataTable)oResult.Return;
                    if (dtTmpIssueUpdateList != null)
                    {
                        gvData.DataSource = dtTmpIssueUpdateList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpIssueUpdateList;
                    }
                }
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE_OLD).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "SP Old Customer Issue Approval Queue List";
                    IssueDAL        oIssueDAL = new IssueDAL();
                    TemplateBuilder tbGvData  = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Old Customer Issue' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oIssueDAL.LoadUnapprovedOldCustomerIssueList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpIssueUpdateList = (DataTable)oResult.Return;
                    if (dtTmpIssueUpdateList != null)
                    {
                        gvData.DataSource = dtTmpIssueUpdateList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpIssueUpdateList;
                    }
                }
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.SP_ISSUE_ONL).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "SP Online Issue Approval Queue List";
                    IssueDAL        oIssueDAL = new IssueDAL();
                    TemplateBuilder tbGvData  = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'SP Online Issue' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oIssueDAL.LoadUnapprovedOnlineIssueList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpIssueUpdateList = (DataTable)oResult.Return;
                    if (dtTmpIssueUpdateList != null)
                    {
                        gvData.DataSource = dtTmpIssueUpdateList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpIssueUpdateList;
                    }
                }
                #endregion Issue

                #region interst payment
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.INTEREST_PAYMENT).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Interst Payment Approval Queue List";
                    InterestPaymentDAL oIntPayDAL = new InterestPaymentDAL();
                    TemplateBuilder    tbGvData   = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Interst Payment' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult         = oIntPayDAL.LoadUnapprovedList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpIntPayList = (DataTable)oResult.Return;
                    if (dtTmpIntPayList != null)
                    {
                        gvData.DataSource = dtTmpIntPayList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpIntPayList;
                    }
                }
                #endregion interst payment

                #region Encashment
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.ENCASHED).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Encashment Approval Queue List";
                    EncashmentDAL   oEncashDAL = new EncashmentDAL();
                    TemplateBuilder tbGvData   = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Encashment' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult         = oEncashDAL.LoadUnapprovedList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtTmpIntPayList = (DataTable)oResult.Return;
                    if (dtTmpIntPayList != null)
                    {
                        gvData.DataSource = dtTmpIntPayList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpIntPayList;
                    }
                }
                #endregion Encashment

                #region Stop Payment
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.STOP_PAYMENT_MARK).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Payment Mark Approval Queue List";
                    StopPaymentDAL  oStopPayDAL = new StopPaymentDAL();
                    TemplateBuilder tbGvData    = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Payment Mark' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oStopPayDAL.LoadUnapprovedPaymentMarkList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }

                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.STOP_PAYMENT_REMOVE_MARK).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Payment Remove Mark Approval Queue List";
                    StopPaymentDAL  oStopPayDAL = new StopPaymentDAL();
                    TemplateBuilder tbGvData    = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Payment Remove Marks' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oStopPayDAL.LoadUnapprovedPaymentRemoveMarkList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.DUPLICATE_ISSUE).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Duplicate Issues Approval Queue List";
                    DuplicateIssueDAL oDIDAL   = new DuplicateIssueDAL();
                    TemplateBuilder   tbGvData = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Duplicate Issues' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oDIDAL.LoadUnapprovedList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }
                #endregion Stop Payment

                #region Lien
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.LIEN_MARK).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Lien Mark Approval Queue List";
                    LienDAL         oLienDAL = new LienDAL();
                    TemplateBuilder tbGvData = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Lien Mark' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oLienDAL.LoadUnapprovedLienMarkList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }

                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.LIEN_MARK_REMOVE).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Lien Mark Remove Approval Queue List";
                    LienDAL         oLienDAL = new LienDAL();
                    TemplateBuilder tbGvData = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Lien Mark Remove' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oLienDAL.LoadUnapprovedLienRemoveMarkList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }
                #endregion Lien

                #region Reinvestment
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.REINVESTMENT).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "Reinvestment Approval Queue List";
                    ReinvestmentDAL oRiDAL   = new ReinvestmentDAL();
                    TemplateBuilder tbGvData = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No 'Reinvestment' record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oRiDAL.LoadUnapprovedList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }
                #endregion Reinvestment

                #region ACE Register
                else if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_TRANS.ACE_MANAGER).PadLeft(5, '0')))
                {
                    lgText.InnerHtml = "ACE Registration Queue List";
                    IssueDAL        oIssueDAL = new IssueDAL();
                    TemplateBuilder tbGvData  = new TemplateBuilder();
                    tbGvData.AppendLiteralString("No record found");
                    gvData.EmptyDataTemplate = tbGvData;

                    Result    oResult = oIssueDAL.LoadUnapprovedACERegisterList(null, true, oConfig.DivisionID, oConfig.BankCodeID);
                    DataTable dtList  = (DataTable)oResult.Return;
                    if (dtList != null)
                    {
                        gvData.DataSource = dtList;
                        gvData.DataBind();
                        Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtList;
                    }
                }
                #endregion ACE Register

                //Make Filter By User
                //Config oConfig = Session[Constants.SES_USER_CONFIG] as Config;
                if (!string.IsNullOrEmpty(oConfig.FilterMakerID))
                {
                    DDListUtil.Assign(ddlUserName, oConfig.FilterMakerID.Trim());
                    FilterData(oConfig.FilterMakerID.Trim());
                }
            }
        }