示例#1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

            if (oConfig != null)
            {
                if (!hdDataType.Value.Equals("2"))
                {
                    Lien oLien = GetObject();
                    oLien.UserDetails          = ucUserDet.UserDetail;
                    oLien.UserDetails.MakeDate = DateTime.Now;
                    ucUserDet.ResetData();
                    LienDAL oLienDAL = new LienDAL();
                    Result  oResult  = oLienDAL.SaveLienMark(oLien);

                    if (oResult.Status)
                    {
                        TotalClear();
                        LoadPreviousList();
                        ucMessage.OpenMessage(Constants.MSG_SUCCESS_SAVE, Constants.MSG_TYPE_SUCCESS);
                    }
                    else
                    {
                        ucMessage.OpenMessage(Constants.MSG_ERROR_SAVE, Constants.MSG_TYPE_ERROR);
                    }
                }
                else
                {
                    ucMessage.OpenMessage(Constants.MSG_APPROVED_SAVE_DATA, Constants.MSG_TYPE_INFO);
                    ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true);
                }
            }
        }
示例#2
0
        public void LoadPreviousList()
        {
            LienDAL oLienDAL = new LienDAL();
            Config  oConfig  = (Config)Session[Constants.SES_USER_CONFIG];
            Result  oResult  = oLienDAL.LoadUnapprovedLienMarkList(oConfig.UserName, false, oConfig.DivisionID, oConfig.BankCodeID);

            DataTable dtTmpList = null;

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

            if (oResult.Status)
            {
                dtTmpList = (DataTable)oResult.Return;
                if (dtTmpList != null)
                {
                    if (dtTmpList.Rows.Count > 0)
                    {
                        gvData.DataSource = dtTmpList;
                        gvData.DataBind();
                    }
                }
            }
            Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = dtTmpList;
        }
示例#3
0
        protected void btnApprove_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(hdLienRemoveTransNo.Value))
            {
                LienRemove oLienRemove = new LienRemove(hdLienRemoveTransNo.Value);
                LienDAL    oLienDAL    = new LienDAL();
                oLienRemove.UserDetails = ucUserDet.UserDetail;

                Result oResult = (Result)oLienDAL.ApproveLienRemoveMark(oLienRemove);
                if (oResult.Status)
                {
                    ReportDAL rdal = new ReportDAL();

                    oResult = rdal.LienLetter(Constants.LETTER_TYPE_LIEN_REMOVE, txtUnlienTransNo.Text);

                    if (oResult.Status)
                    {
                        Session[Constants.SES_RPT_DATA] = oResult.Return;
                        Page.RegisterStartupScript(Constants.REPORT_WINDOW, Util.OpenReport());
                    }
                    //ucMessage.OpenMessage(Constants.MSG_SUCCESS_APPROVE, Constants.MSG_TYPE_SUCCESS);
                    ClearAfterApprove();
                }
                else
                {
                    ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND + " to Approve", Constants.MSG_TYPE_INFO);
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_APPROVE, Constants.MSG_TYPE_ERROR);
            }
        }
示例#4
0
        protected void btnApprove_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(hdLienTransNo.Value))
            {
                Lien    oLien    = new Lien(hdLienTransNo.Value);
                LienDAL oLienDAL = new LienDAL();
                oLien.UserDetails = ucUserDet.UserDetail;

                Result oResult = (Result)oLienDAL.ApproveLienMark(oLien);
                if (oResult.Status)
                {
                    ReportDAL rdal = new ReportDAL();

                    oResult = rdal.LienLetter(Constants.LETTER_TYPE_LIEN, txtLienTransNo.Text);

                    if (oResult.Status)
                    {
                        Session[Constants.SES_RPT_DATA] = oResult.Return;
                        Page.RegisterStartupScript(Constants.REPORT_WINDOW, Util.OpenReport());
                    }
                    ClearAfterApprove();
                    //ucMessage.OpenMessage(Constants.MSG_SUCCESS_APPROVE, Constants.MSG_TYPE_SUCCESS);
                    //Response.Redirect(Constants.PAGE_TRAN_APPROVAL + "?pType=" + Convert.ToString((int)Constants.PAGEINDEX_TRANS.LIEN_MARK).PadLeft(5, '0'), false);
                }
                else
                {
                    ucMessage.OpenMessage(Constants.MSG_ERROR_APPROVE, Constants.MSG_TYPE_ERROR);
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND + " to Approve", Constants.MSG_TYPE_INFO);
            }
        }
示例#5
0
        private void LoadDataByRegNo(string sTransNo, string sRegNo, string sApprovalStaus)
        {
            LienDAL oLienDAL = new LienDAL();
            Result  oResult  = null;

            if (SEARCH_FROM.Equals(2)) //LienMark search
            {
                oResult = (Result)oLienDAL.LoadLienRemoveMarkByRegNo("", sTransNo, sRegNo, "");
            }
            else if (SEARCH_FROM.Equals(1) || SEARCH_FROM.Equals(3) || SEARCH_FROM.Equals(4))
            {
                oResult = (Result)oLienDAL.LoadLienRemoveMarkByRegNo(sTransNo, "", sRegNo, sApprovalStaus);
            }

            TotalClear();
            //hdIssueTransNo.Value = sRegNo;
            if (oResult.Status)
            {
                LienRemove oLienRemove = (LienRemove)oResult.Return;
                SetObject(oLienRemove);

                if (hdDataType.Value.Equals("2"))
                {
                    EnableDisableControl(true);
                    Util.ControlEnabled(btnReject, false);
                    Util.ControlEnabled(btnApprove, false);
                    Util.ControlEnabled(btnBack, false);

                    Util.ControlEnabled(btnReset, true);
                    Util.ControlEnabled(btnSave, true);
                    Util.ControlEnabled(btnDelete, true);

                    fsList.Visible          = true;
                    btnRegSearch.Enabled    = true;
                    btnUnLienSearch.Enabled = true;
                }
                else if (SEARCH_FROM.Equals(4))
                {
                    EnableDisableControl(true);
                    Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), true);
                }
                else
                {
                    EnableDisableControl(false);
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
            }
        }
示例#6
0
        private void LoadDataByTransactionNo(string sTransactionNo)
        {
            LienDAL oLienDAL = new LienDAL();
            Result  oResult  = (Result)oLienDAL.LoadLienRemoveMarkByTransactionNo(sTransactionNo);

            TotalClear();

            if (oResult.Status)
            {
                LienRemove oLienRemove = (LienRemove)oResult.Return;
                SetObject(oLienRemove);
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
            }
        }
示例#7
0
        private void LoadDataByRegNo(string sLienMarkTransNo, string sRegNo, string sApprovalStaus)
        {
            LienDAL oLienDAL = new LienDAL();
            Result  oResult  = (Result)oLienDAL.LoadLienMarkByRegNo(sLienMarkTransNo, sRegNo, sApprovalStaus);

            TotalClear();
            if (oResult.Status)
            {
                Lien oLien = (Lien)oResult.Return;
                SetObject(oLien);

                if (hdDataType.Value.Equals("2"))
                {
                    EnableDisableControl(true);
                    Util.ControlEnabled(btnReset, true);
                    Util.ControlEnabled(btnSave, true);
                    Util.ControlEnabled(btnDelete, true);
                    btnRegSearch.Enabled = true;
                    fsList.Visible       = true;
                }
                else if (SEARCH_FROM.Equals(3))
                {
                    EnableDisableControl(true);
                    Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), true);
                }
                else
                {
                    EnableDisableControl(false);
                }

                if (oLien.Issue.IssueTransNo == "")
                {
                    ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
                    ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true);
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
                ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true);
            }
        }
示例#8
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            if (!hdDataType.Value.Equals("2"))
            {
                if (!string.IsNullOrEmpty(hdLienTransNo.Value))
                {
                    LienDAL oStopPayDAL = new LienDAL();
                    Result  oResult     = (Result)oStopPayDAL.DeteteLienMark(hdLienTransNo.Value);

                    if (oResult.Status)
                    {
                        TotalClear();
                        LoadPreviousList();
                        ucMessage.OpenMessage(Constants.MSG_SUCCESS_DELETE, Constants.MSG_TYPE_SUCCESS);
                    }
                    else
                    {
                        if (oResult.Message.Equals(Constants.TABLE_MAIN))
                        {
                            ucMessage.OpenMessage(Constants.MSG_APPROVED_DELETE_DATA, Constants.MSG_TYPE_ERROR);
                        }
                        else
                        {
                            ucMessage.OpenMessage(Constants.MSG_ERROR_DELETE, Constants.MSG_TYPE_ERROR);
                        }
                    }
                }
                else
                {
                    ucMessage.OpenMessage(Constants.MSG_ERROR_DELETE, Constants.MSG_TYPE_ERROR);
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_APPROVED_DELETE_DATA, Constants.MSG_TYPE_INFO);
                ScriptManager.RegisterStartupScript(this.UpdatePanel2, typeof(string), Constants.POPUP_WINDOW, Util.OpenPopup("info"), true);
            }
        }
示例#9
0
        protected void btnReject_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(hdLienTransNo.Value))
            {
                Lien    oLien    = new Lien(hdLienTransNo.Value);
                LienDAL oLienDAL = new LienDAL();
                oLien.UserDetails = ucUserDet.UserDetail;

                Result oResult = (Result)oLienDAL.RejectLienMark(oLien);
                if (oResult.Status)
                {
                    ucMessage.OpenMessage(Constants.MSG_SUCCESS_REJECT, Constants.MSG_TYPE_SUCCESS);
                }
                else
                {
                    ucMessage.OpenMessage(Constants.MSG_ERROR_REJECT, Constants.MSG_TYPE_ERROR);
                }
            }
            else
            {
                ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND + " to Reject", Constants.MSG_TYPE_INFO);
            }
        }
示例#10
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());
                }
            }
        }
示例#11
0
        private void LoadDataByRegNo(string sTransNo, string sRegNo, string sApprovalStaus, string sType)
        {
            LienDAL oLienDAL = new LienDAL();
            Result  oResult  = null;

            TotalClear();

            DataTable dt = new DataTable();

            dt.Columns.Add(new DataColumn("Reg No", typeof(string)));
            dt.Columns.Add(new DataColumn("Issue Date", typeof(string)));
            dt.Columns.Add(new DataColumn("Bond Holder", typeof(string)));
            dt.Columns.Add(new DataColumn("Certificate No", typeof(string)));
            dt.Columns.Add(new DataColumn("Denomination", typeof(string)));
            dt.Columns.Add(new DataColumn("Amount", typeof(string)));

            DataRow   row = null;
            ArrayList al  = new ArrayList();

            if (sType.Equals("LM")) //LienMark search
            {
                oResult = (Result)oLienDAL.LoadLienMarkByTransactionNo(sTransNo, sApprovalStaus);
                if (oResult.Status)
                {
                    Lien oLien = (Lien)oResult.Return;
                    if (oLien != null)
                    {
                        txtLienBank.Text    = oLien.LienBank + (oLien.LienBankAddress == "" ? "" : "," + oLien.LienBankAddress);
                        txtOurRefNo.Text    = oLien.OurRef;
                        txtThierRefNo.Text  = oLien.TheirRef;
                        txtLienTransNo.Text = oLien.LienTransNo;
                        txtLienDate.Text    = oLien.LienDate.ToString(Constants.DATETIME_FORMAT);


                        if (oLien.DtLienDetails.Rows.Count > 0)
                        {
                            for (int i = 0; i < oLien.DtLienDetails.Rows.Count; i++)
                            {
                                if (!al.Contains(oLien.DtLienDetails.Rows[i]["SP Series"]))
                                {
                                    row                   = dt.NewRow();
                                    row["Reg No"]         = oLien.Issue.RegNo;
                                    row["Issue Date"]     = oLien.Issue.VersionIssueDate.ToString(Constants.DATETIME_dd_MMM_yyyy);
                                    row["Bond Holder"]    = oLien.Issue.BondHolderName;
                                    row["Certificate No"] = oLien.DtLienDetails.Rows[i]["SP Series"] + "-" + oLien.DtLienDetails.Rows[i]["SPScripID"];
                                    row["Denomination"]   = oLien.DtLienDetails.Rows[i]["Denomination"];
                                    row["Amount"]         = oLien.DtLienDetails.Rows[i]["Denomination"];

                                    dt.Rows.Add(row);
                                    al.Add(oLien.DtLienDetails.Rows[i]["SP Series"]);
                                }
                                else
                                {
                                    dt.Rows[al.IndexOf(oLien.DtLienDetails.Rows[i]["SP Series"])]["Amount"]         = Convert.ToDouble(dt.Rows[al.IndexOf(oLien.DtLienDetails.Rows[i]["SP Series"])]["Amount"]) + Convert.ToDouble(oLien.DtLienDetails.Rows[i]["Denomination"]);
                                    dt.Rows[al.IndexOf(oLien.DtLienDetails.Rows[i]["SP Series"])]["Certificate No"] = dt.Rows[al.IndexOf(oLien.DtLienDetails.Rows[i]["SP Series"])]["Certificate No"] + ", " + oLien.DtLienDetails.Rows[i]["SP Series"] + "-" + oLien.DtLienDetails.Rows[i]["SPScripID"];
                                }
                            }
                        }

                        if (dt.Rows.Count > 0)
                        {
                            gvData.DataSource = dt;
                        }
                        else
                        {
                            gvData.DataSource = null;
                        }
                        gvData.DataBind();
                    }
                }
            }
            else if (sType.Equals("LMR")) //LienMark remove search
            {
                oResult = (Result)oLienDAL.LoadLienRemoveMarkByRegNo(sTransNo, "", sRegNo, sApprovalStaus);
                if (oResult.Status)
                {
                    LienRemove oLienRemove = (LienRemove)oResult.Return;
                    if (oLienRemove != null)
                    {
                        txtLienBank.Text   = oLienRemove.LienBank + (oLienRemove.LienBankAddress == "" ? "" : "," + oLienRemove.LienBankAddress);
                        txtOurRefNo.Text   = oLienRemove.OurRef;
                        txtThierRefNo.Text = oLienRemove.TheirRef;
                        //txtLienTransNo.Text = oLienRemove.Lien.LienTransNo;
                        txtLienTransNo.Text = sTransNo;
                        txtLienDate.Text    = oLienRemove.Lien.LienDate.ToString(Constants.DATETIME_FORMAT);

                        if (oLienRemove.DtLienRemoveDetail.Rows.Count > 0)
                        {
                            for (int i = 0; i < oLienRemove.DtLienRemoveDetail.Rows.Count; i++)
                            {
                                if (!al.Contains(oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"]))
                                {
                                    row                   = dt.NewRow();
                                    row["Reg No"]         = oLienRemove.Issue.RegNo;
                                    row["Issue Date"]     = oLienRemove.Issue.VersionIssueDate.ToString(Constants.DATETIME_dd_MMM_yyyy);
                                    row["Bond Holder"]    = oLienRemove.Issue.BondHolderName;
                                    row["Certificate No"] = oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"] + "-" + oLienRemove.DtLienRemoveDetail.Rows[i]["SPScripID"];
                                    row["Denomination"]   = oLienRemove.DtLienRemoveDetail.Rows[i]["Denomination"];
                                    row["Amount"]         = oLienRemove.DtLienRemoveDetail.Rows[i]["Denomination"];

                                    dt.Rows.Add(row);
                                    al.Add(oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"]);
                                }
                                else
                                {
                                    dt.Rows[al.IndexOf(oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"])]["Amount"]         = Convert.ToDouble(dt.Rows[al.IndexOf(oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"])]["Amount"]) + Convert.ToDouble(oLienRemove.DtLienRemoveDetail.Rows[i]["Denomination"]);
                                    dt.Rows[al.IndexOf(oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"])]["Certificate No"] = dt.Rows[al.IndexOf(oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"])]["Certificate No"] + ", " + oLienRemove.DtLienRemoveDetail.Rows[i]["SP Series"] + "-" + oLienRemove.DtLienRemoveDetail.Rows[i]["SPScripID"];
                                }
                            }
                        }

                        if (dt.Rows.Count > 0)
                        {
                            gvData.DataSource = dt;
                        }
                        else
                        {
                            gvData.DataSource = null;
                        }
                        gvData.DataBind();
                    }
                }
            }
        }