public void GetAccInfo1()
        {
            try
            {
                Int64         AccNumber = Converter.GetLong(txtAccNo.Text);
                A2ZACCOUNTDTO accgetDTO = (A2ZACCOUNTDTO.GetInfoAccNo(AccNumber));
                if (accgetDTO.a == 0)
                {
                    InvalidAccount();
                    txtAccNo.Text = string.Empty;
                    txtAccNo.Focus();
                    return;
                }
                else
                {
                    CtrlAccStatus.Text = Converter.GetString(accgetDTO.AccStatus);

                    if (CtrlAccStatus.Text == "98")
                    {
                        txtAccNo.Text = string.Empty;
                        txtAccNo.Focus();
                        TransferedAccount();
                        return;
                    }

                    if (CtrlAccStatus.Text == "99")
                    {
                        txtAccNo.Text = string.Empty;
                        txtAccNo.Focus();
                        ClosedAccount();
                        return;
                    }


                    CtrlLadgerBalance.Text = Converter.GetString(String.Format("{0:0,0.00}", accgetDTO.AccBalance));
                    CtrlLienAmt.Text       = Converter.GetString(String.Format("{0:0,0.00}", accgetDTO.AccLienAmt));
                    CtrlLoanSancAmt.Text   = Converter.GetString(String.Format("{0:0,0.00}", accgetDTO.LoanAmount));

                    CtrlAccType.Text = Converter.GetString(accgetDTO.AccType);
                    lblcls.Text      = Converter.GetString(accgetDTO.AccAtyClass);


                    UnPostValue();


                    lblCuType.Text = Converter.GetString(accgetDTO.CuType);
                    lblCuNo.Text   = Converter.GetString(accgetDTO.CuNo);

                    txtCreditUNo.Text = (lblCuType.Text + "-" + lblCuNo.Text);


                    txtMemNo.Text = Converter.GetString(accgetDTO.MemberNo);

                    lblAtyClass.Text = Converter.GetString(accgetDTO.AccAtyClass);

                    if (lblAtyClass.Text == "7")
                    {
                        string input = txtAccNo.Text;
                        lblPayType.Text = input.Substring(13, 3);
                        int           paytype = Converter.GetInteger(lblPayType.Text);
                        A2ZTRNCODEDTO get3DTO = (A2ZTRNCODEDTO.GetInformation99(paytype));
                        if (get3DTO.TrnCode > 0)
                        {
                            lblTrnCode.Text  = Converter.GetString(get3DTO.TrnCode);
                            lblAccTitle.Text = Converter.GetString(get3DTO.TrnDescription);
                        }
                    }
                    else
                    {
                        lblPayType.Text = "0";
                        Int16         AccType = Converter.GetSmallInteger(CtrlAccType.Text);
                        A2ZACCTYPEDTO get3DTO = (A2ZACCTYPEDTO.GetInformation(AccType));
                        if (get3DTO.AccTypeCode > 0)
                        {
                            lblAccTitle.Text = Converter.GetString(get3DTO.AccTypeDescription);
                        }

                        int           AType   = Converter.GetInteger(CtrlAccType.Text);
                        A2ZTRNCODEDTO get4DTO = (A2ZTRNCODEDTO.GetInformation01(AType));
                        if (get4DTO.TrnCode > 0)
                        {
                            lblTrnCode.Text = Converter.GetString(get4DTO.TrnCode);
                        }
                    }

                    Int16        CType   = Converter.GetSmallInteger(lblCuType.Text);
                    int          CNo     = Converter.GetInteger(lblCuNo.Text);
                    A2ZCUNIONDTO get5DTO = (A2ZCUNIONDTO.GetInformation(CType, CNo));
                    if (get5DTO.NoRecord > 0)
                    {
                        lblCuName.Text = Converter.GetString(get5DTO.CreditUnionName);
                    }

                    Int16        CUType  = Converter.GetSmallInteger(lblCuType.Text);
                    int          CUNo    = Converter.GetInteger(lblCuNo.Text);
                    int          MNo     = Converter.GetInteger(txtMemNo.Text);
                    A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                    if (get6DTO.NoRecord > 0)
                    {
                        lblMemName.Text = Converter.GetString(get6DTO.MemberName);
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.GetAccInfo Problem');</script>");
                //throw ex;
            }
        }
示例#2
0
        public void GetAccInfo2()
        {
            try
            {
                Int64         AccNumber = Converter.GetLong(txtTrnAccNo.Text);
                A2ZACCOUNTDTO accgetDTO = (A2ZACCOUNTDTO.GetInfoAccNo(AccNumber));
                if (accgetDTO.a == 0)
                {
                    InvalidAccount();
                    txtTrnAccNo.Text = string.Empty;
                    txtTrnAccNo.Focus();
                    return;
                }
                else
                {
                    CtrlAccStatus.Text = Converter.GetString(accgetDTO.AccStatus);

                    if (CtrlAccStatus.Text == "98")
                    {
                        txtTrnAccNo.Text = string.Empty;
                        txtTrnAccNo.Focus();
                        TransferedAccount();
                        return;
                    }

                    if (CtrlAccStatus.Text == "99")
                    {
                        txtTrnAccNo.Text = string.Empty;
                        txtTrnAccNo.Focus();
                        ClosedAccount();
                        return;
                    }


                    txtTrnStaffCode.Text = Converter.GetString(accgetDTO.MemberNo);


                    CtrlTrnAccType.Text = Converter.GetString(accgetDTO.AccType);

                    lblcls.Text         = Converter.GetString(accgetDTO.AccAtyClass);
                    lblTrnAtyClass.Text = Converter.GetString(accgetDTO.AccAtyClass);


                    if (lblTrnAtyClass.Text == "5" || lblTrnAtyClass.Text == "6")
                    {
                        lblIntAmt.Visible     = true;
                        txtIntAmt.Visible     = true;
                        lblPrincAmt.Visible   = true;
                        txtPrincAmt.Visible   = true;
                        txtTrnAmount.ReadOnly = true;
                    }


                    if (lblAtyClass.Text == "7")
                    {
                        string input = txtTrnAccNo.Text;
                        lblTrnPayType.Text = input.Substring(13, 3);
                        int           paytype = Converter.GetInteger(lblTrnPayType.Text);
                        A2ZTRNCODEDTO get3DTO = (A2ZTRNCODEDTO.GetInformation99(paytype));
                        if (get3DTO.TrnCode > 0)
                        {
                            lblTrnAccTitle.Text = Converter.GetString(get3DTO.TrnDescription);
                        }
                    }
                    else
                    {
                        lblTrnPayType.Text = "0";
                        Int16         AccType = Converter.GetSmallInteger(CtrlTrnAccType.Text);
                        A2ZACCTYPEDTO get3DTO = (A2ZACCTYPEDTO.GetInformation(AccType));
                        if (get3DTO.AccTypeCode > 0)
                        {
                            lblTrnAccTitle.Text = Converter.GetString(get3DTO.AccTypeDescription);
                        }
                    }



                    int          MNo     = Converter.GetInteger(txtTrnStaffCode.Text);
                    A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(0, 0, MNo));
                    if (get6DTO.NoRecord > 0)
                    {
                        lblTrnStaffName.Text = Converter.GetString(get6DTO.MemberName);
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.GetAccInfo Problem');</script>");
                //throw ex;
            }
        }
        public void GetAccInfo()
        {
            try
            {
                Int64         AccNumber = Converter.GetLong(txtAccNo.Text);
                A2ZACCOUNTDTO accgetDTO = (A2ZACCOUNTDTO.GetInfoAccNo(AccNumber));
                if (accgetDTO.a == 0)
                {
                    InvalidAccountNoMSG();
                    txtAccNo.Text = string.Empty;
                    txtAccNo.Focus();
                    return;
                }
                else
                {
                    CtrlAccStatus.Text = Converter.GetString(accgetDTO.AccStatus);

                    if (CtrlAccStatus.Text == "98")
                    {
                        txtAccNo.Text = string.Empty;
                        txtAccNo.Focus();
                        AccTransferedMSG();
                        return;
                    }


                    Int16           AccStat = Converter.GetSmallInteger(CtrlAccStatus.Text);
                    A2ZACCSTATUSDTO get0DTO = (A2ZACCSTATUSDTO.GetInformation(AccStat));
                    if (get0DTO.AccStatusCode > 0)
                    {
                        txtstat.Text = Converter.GetString(get0DTO.AccStatusDescription);
                    }



                    lblCuType.Text = Converter.GetString(accgetDTO.CuType);
                    lblCuNo.Text   = Converter.GetString(accgetDTO.CuNo);

                    txtCreditUNo.Text = (lblCuType.Text + "-" + lblCuNo.Text);


                    txtCULBMemNo.Text = Converter.GetString(accgetDTO.MemberNo);


                    CtrlAccType.Text = Converter.GetString(accgetDTO.AccType);

                    lblcls.Text = Converter.GetString(accgetDTO.AccAtyClass);

                    if (lblcls.Text == "7")
                    {
                        string input2  = txtAccNo.Text;
                        string paytype = input2.Substring(12, 4);

                        int           atyclass = Converter.GetInteger(lblcls.Text);
                        int           paycode  = Converter.GetInteger(paytype);
                        A2ZPAYTYPEDTO get1DTO  = (A2ZPAYTYPEDTO.GetInformation(atyclass, paycode));
                        if (get1DTO.PayTypeCode > 0)
                        {
                            lblAccTitle.Text = Converter.GetString(get1DTO.PayTypeDescription);
                            int           pcode   = Converter.GetInteger(paytype);
                            A2ZTRNCODEDTO get2DTO = (A2ZTRNCODEDTO.GetInformation99(pcode));
                            if (get2DTO.TrnCode > 0)
                            {
                                lblTrnCode.Text = Converter.GetString(get2DTO.TrnCode);
                            }
                        }
                    }
                    else
                    {
                        Int16         AccType = Converter.GetSmallInteger(CtrlAccType.Text);
                        A2ZACCTYPEDTO get3DTO = (A2ZACCTYPEDTO.GetInformation(AccType));
                        if (get3DTO.AccTypeCode > 0)
                        {
                            lblAccTitle.Text = Converter.GetString(get3DTO.AccTypeDescription);
                        }

                        int           AType   = Converter.GetInteger(CtrlAccType.Text);
                        A2ZTRNCODEDTO get4DTO = (A2ZTRNCODEDTO.GetInformation01(AType));
                        if (get4DTO.TrnCode > 0)
                        {
                            lblTrnCode.Text = Converter.GetString(get4DTO.TrnCode);
                        }
                    }


                    Int16        CType   = Converter.GetSmallInteger(lblCuType.Text);
                    int          CNo     = Converter.GetInteger(lblCuNo.Text);
                    A2ZCUNIONDTO get5DTO = (A2ZCUNIONDTO.GetInformation(CType, CNo));
                    if (get5DTO.NoRecord > 0)
                    {
                        hdnCashCode.Text = Converter.GetString(get5DTO.GLCashCode);

                        if (lblModule.Text == "06" && hdnCashCode.Text != lblCashCode.Text)
                        {
                            txtAccNo.Text     = string.Empty;
                            txtCreditUNo.Text = string.Empty;
                            txtCULBMemNo.Text = string.Empty;

                            txtAccNo.Focus();

                            AccessDeniedMSG();
                            return;
                        }


                        lblCuName.Text = Converter.GetString(get5DTO.CreditUnionName);
                    }

                    Int16        CUType  = Converter.GetSmallInteger(lblCuType.Text);
                    int          CUNo    = Converter.GetInteger(lblCuNo.Text);
                    int          MNo     = Converter.GetInteger(txtCULBMemNo.Text);
                    A2ZMEMBERDTO get6DTO = (A2ZMEMBERDTO.GetInformation(CUType, CUNo, MNo));
                    if (get6DTO.NoRecord > 0)
                    {
                        lblMemName.Text = Converter.GetString(get6DTO.MemberName);
                    }


                    if (lblcls.Text == "4")
                    {
                        DateTime dt0   = Converter.GetDateTime(accgetDTO.LastTrnDate);
                        string   date0 = dt0.ToString("dd/MM/yyyy");
                        tLastTrnDate.Text = date0;

                        if (tLastTrnDate.Text == "01/01/0001")
                        {
                            tLastTrnDate.Text = string.Empty;
                        }


                        DateTime dt12   = Converter.GetDateTime(accgetDTO.MatruityDate);
                        string   date12 = dt12.ToString("dd/MM/yyyy");
                        tMaturityDt.Text = date12;

                        if (tMaturityDt.Text == "01/01/0001")
                        {
                            tMaturityDt.Text = string.Empty;
                        }


                        tAccPeriod.Text = Converter.GetString(accgetDTO.Period);

                        tTotalDeposit.Text = Converter.GetString(String.Format("{0:0,0.00}", accgetDTO.TotDepositAmount));
                        tMthDeposit.Text   = Converter.GetString(String.Format("{0:0,0.00}", accgetDTO.DepositAmount));


                        DateTime TrnDate              = DateTime.ParseExact(lblProcDate.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture);
                        Int16    CuType               = Converter.GetSmallInteger(lblCuType.Text);
                        int      CuNo                 = Converter.GetInteger(lblCuNo.Text);
                        Int16    Acctype              = Converter.GetSmallInteger(CtrlAccType.Text);
                        Int64    AccNo                = Converter.GetLong(txtAccNo.Text);
                        int      MemNumber            = Converter.GetInteger(txtCULBMemNo.Text);
                        A2ZPENSIONDEFAULTERDTO getDTO = (A2ZPENSIONDEFAULTERDTO.GetPensionDepInformation(TrnDate, CuType, CuNo, MemNumber, Acctype, AccNumber));
                        if (getDTO.CuType > 0)
                        {
                            tDueDepositAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", (getDTO.DueDepositAmt)));

                            tUptoDate.Text = Converter.GetString(getDTO.UptoDate);
                        }
                    }
                }

                string    qry = "SELECT Id,AccNo,AccOpenDate,AccMatureDate,AccRenwlDate,AccPeriod,AccBalance,AccOrgAmt,AccPrincipal,AccIntRate,AccLoanSancAmt,AccLoanSancDate,AccDisbAmt,AccDisbDate,AccNoInstl,AccLoanInstlAmt,AccLoanLastInstlAmt,AccAtyClass,AccOldNumber,AccCertNo,AccFixedMthInt FROM A2ZACCOUNT where AccType ='" + CtrlAccType.Text + "' and CuType='" + lblCuType.Text + "' and CuNo='" + lblCuNo.Text + "' and  MemNo='" + txtCULBMemNo.Text + "' and  AccNo ='" + txtAccNo.Text + "'";
                DataTable dt  = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZCSMCUS");
                if (dt.Rows.Count > 0)
                {
                    //For Report Header Parameter class wise

                    // Loan Information

                    tAccBalance.Text          = Converter.GetString(dt.Rows[0]["AccBalance"]);
                    tAccLoanSancAmt.Text      = Converter.GetString(dt.Rows[0]["AccLoanSancAmt"]);
                    tAccLoanSancDate.Text     = Converter.GetString(dt.Rows[0]["AccLoanSancDate"]);
                    tAccDisbAmt.Text          = Converter.GetString(dt.Rows[0]["AccDisbAmt"]);
                    tAccDisbDate.Text         = Converter.GetString(dt.Rows[0]["AccDisbDate"]);
                    tAccNoInstl.Text          = Converter.GetString(dt.Rows[0]["AccNoInstl"]);
                    tAccLoanInstlAmt.Text     = Converter.GetString(dt.Rows[0]["AccLoanInstlAmt"]);
                    tAccLoanLastInstlAmt.Text = Converter.GetString(dt.Rows[0]["AccLoanLastInstlAmt"]);
                    tOpenDt.Text = Converter.GetString(dt.Rows[0]["AccOpenDate"]);
                    tClass.Text  = Converter.GetString(dt.Rows[0]["AccAtyClass"]);

                    // FOR A/C TYPE Class
                    int AccTypeClass = Converter.GetSmallInteger(tClass.Text);
                    if (AccTypeClass == 2 || AccTypeClass == 3)
                    {
                        //  tOpenDt.Text = Converter.GetString(dt.Rows[0]["AccOpenDate"]);

                        tMaturityDt.Text = Converter.GetString(dt.Rows[0]["AccMatureDate"]);
                        tRenewalDt.Text  = Converter.GetString(dt.Rows[0]["AccRenwlDate"]);

                        tAccPeriod.Text    = Converter.GetString(dt.Rows[0]["AccPeriod"]);
                        tOrgAmt.Text       = Converter.GetString(dt.Rows[0]["AccOrgAmt"]);
                        tPrincipleAmt.Text = Converter.GetString(dt.Rows[0]["AccPrincipal"]);
                        tOldAccount.Text   = Converter.GetString(dt.Rows[0]["AccOldNumber"]);
                        tAccCertNo.Text    = Converter.GetString(dt.Rows[0]["AccCertNo"]);
                    }

                    if (AccTypeClass == 2)
                    {
                        // Int Rate
                        tIntRate.Text = Converter.GetString(dt.Rows[0]["AccIntRate"]);
                    }


                    if (AccTypeClass == 3)
                    {
                        // Monthly Benefit
                        tAccFixedMthInt.Text = Converter.GetString(dt.Rows[0]["AccFixedMthInt"]);
                    }


                    // decimal b = Converter.GetDecimal(dt.Rows[0]["AccBalance"]);
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.GetAccInfo Problem');</script>");
                //throw ex;
            }
        }