Пример #1
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZPAYTYPEDTO objDTO = new A2ZPAYTYPEDTO();

                objDTO.PayTypeCode        = Converter.GetSmallInteger(txtcode.Text);
                objDTO.PayTypeDescription = Converter.GetString(txtDescription.Text);
                objDTO.AccTypeClass       = Converter.GetSmallInteger(ddlAccTypeClass.SelectedValue);
                objDTO.PayMode            = Converter.GetSmallInteger(ddlPayMode.SelectedValue);


                int roweffect = A2ZPAYTYPEDTO.InsertInformation(objDTO);
                if (roweffect > 0)
                {
                    txtcode.Focus();
                    clearinfo();
                    PayTypedropdown();
                    gvDetail();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void ddlpaytype_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ddlpaytype.SelectedValue != "-Select-")
                {
                    int MainCode = Converter.GetInteger(ddlpaytype.SelectedValue);

                    int           aclass = 7;
                    A2ZPAYTYPEDTO getDTO = (A2ZPAYTYPEDTO.GetInformation(aclass, MainCode));

                    if (getDTO.record > 0)
                    {
                        txtPaytype.Text = Converter.GetString(getDTO.PayTypeCode);
                    }
                    else
                    {
                        txtPaytype.Text = string.Empty;
                        txtPaytype.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        protected void ddlType_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlType.SelectedValue == "-Select-")
            {
                txtcode.Focus();
                txtcode.Text        = string.Empty;
                txtDescription.Text = string.Empty;
                //       ddlAccTypeClass.SelectedValue = "0";
                BtnSubmit.Visible = true;
                BtnUpdate.Visible = false;
            }

            try
            {
                if (ddlType.SelectedValue != "-Select-")
                {
                    int           ClassCode = Converter.GetInteger(ddlAccTypeClass.Text);
                    int           MainCode  = Converter.GetInteger(ddlType.SelectedValue);
                    A2ZPAYTYPEDTO getDTO    = (A2ZPAYTYPEDTO.GetInformation(ClassCode, MainCode));
                    if (getDTO.record > 0)
                    {
                        txtcode.Text                  = Converter.GetString(getDTO.PayTypeCode);
                        txtDescription.Text           = Converter.GetString(getDTO.PayTypeDescription);
                        ddlAccTypeClass.SelectedValue = Converter.GetString(getDTO.AccTypeClass);
                        ddlPayMode.SelectedValue      = Converter.GetString(getDTO.PayMode);
                        BtnSubmit.Visible             = false;
                        BtnUpdate.Visible             = true;
                        txtDescription.Focus();
                    }
                    else
                    {
                        txtDescription.Text = string.Empty;
                        txtDescription.Focus();
                        BtnSubmit.Visible = true;
                        BtnUpdate.Visible = false;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #4
0
 protected void ddlPayType_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (ddlPayType.SelectedValue != "-Select-")
         {
             Int16         ClassCode = Converter.GetSmallInteger(ddlPayType.SelectedValue);
             int           TypeCode  = Converter.GetInteger(ddlPayType.SelectedValue);
             A2ZPAYTYPEDTO getDTO    = (A2ZPAYTYPEDTO.GetInformation(ClassCode, TypeCode));
             if (getDTO.PayTypeCode > 0)
             {
                 lblPayMode.Text = Converter.GetString(getDTO.PayMode);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        protected void txtCodeType_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtCodeType.Text != string.Empty)
                {
                    int AccClass = Converter.GetInteger(lblAccTypeClass.Text);
                    int CodeType = Converter.GetInteger(txtCodeType.Text);

                    A2ZPAYTYPEDTO getDTO = (A2ZPAYTYPEDTO.GetInformation(AccClass, CodeType));
                    if (getDTO.record > 0)
                    {
                        ddlCodeType.SelectedValue = Converter.GetString(getDTO.PayTypeCode);
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.txtCrUnion_TextChanged Problem');</script>");
                //throw ex;
            }
        }
Пример #6
0
        protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            A2ZPAYTYPEDTO UpDTO = new A2ZPAYTYPEDTO();

            UpDTO.PayTypeCode        = Converter.GetInteger(txtcode.Text);
            UpDTO.PayTypeDescription = Converter.GetString(txtDescription.Text);
            UpDTO.AccTypeClass       = Converter.GetInteger(ddlAccTypeClass.SelectedValue);
            UpDTO.PayMode            = Converter.GetSmallInteger(ddlPayMode.SelectedValue);

            int roweffect = A2ZPAYTYPEDTO.UpdateInformation(UpDTO);

            if (roweffect > 0)
            {
                PayTypedropdown();
                clearinfo();
                //   ddlType.SelectedValue = "0";
                BtnSubmit.Visible = true;
                BtnUpdate.Visible = false;
                txtcode.Focus();
                gvDetail();
            }
        }
Пример #7
0
        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;
            }
        }