protected void BtnNewSanction_Click(object sender, EventArgs e)
        {
            try
            {
                if (ItxtMemNo.Text == string.Empty)
                {
                    ItxtMemNo.Text = string.Empty;
                    ItxtMemNo.Focus();
                    InvalidMemMSG();
                    return;
                }

                if (ddlIAccType.SelectedValue == "-Select-")
                {
                    InvalidAccTypeMSG();
                    return;
                }

                if (ItxtIncreaseSanctionAmount.Text == string.Empty)
                {
                    ItxtIncreaseSanctionAmount.Text = string.Empty;
                    ItxtIncreaseSanctionAmount.Focus();
                    InvalidSancAmtMSG();
                    return;
                }

                if (ItxtNewInterestRate.Text == string.Empty)
                {
                    ItxtNewInterestRate.Text = string.Empty;
                    ItxtNewInterestRate.Focus();
                    InvalidIntRateMSG();
                    return;
                }

                A2ZLOANHSTDTO objDTO = new A2ZLOANHSTDTO();
                objDTO.AccType  = Converter.GetInteger(ddlIAccType.SelectedValue);
                objDTO.AccNo    = Converter.GetLong(ItxtAccNo.Text);
                objDTO.CuType   = Converter.GetSmallInteger(0);
                objDTO.CuNo     = Converter.GetInteger(0);
                objDTO.MemberNo = Converter.GetInteger(ItxtMemNo.Text);
                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                objDTO.SanctionDate       = Converter.GetDateTime(dto.ProcessDate);
                objDTO.PrevSanctionAmount = Converter.GetDecimal(IlblExSancAmt.Text);
                objDTO.PrevIntRate        = Converter.GetDecimal(IlblExIntRate.Text);

                objDTO.PrevNoInstl          = Converter.GetInteger(IlblExNoInstl.Text);
                objDTO.PrevLoanInstlAmt     = Converter.GetDecimal(lblExistInstlAmt.Text);
                objDTO.PrevLoanLastInstlAmt = Converter.GetDecimal(lblExistLastInstlAmt.Text);

                objDTO.ApproveBy = Converter.GetSmallInteger(hdnID.Text);


                int result = A2ZLOANHSTDTO.InsertRSInformation(objDTO);
                if (result > 0)
                {
                    string strQuery  = "UPDATE A2ZACCOUNT SET  AccLoanSancAmt = '" + ItxtIncreaseSanctionAmount.Text + "',AccDisbAmt = '" + lblDisbAmt.Text + "', AccLoanInstlAmt= '" + ItxtNewInstalAmt.Text + "',AccLoanLastInstlAmt= '" + ItxtNewLastInstalAmt.Text + "',AccNoInstl= '" + ItxtNewNoInstal.Text + "',AccIntRate= '" + ItxtNewInterestRate.Text + "' WHERE  CuType=0 AND CuNo=0 AND MemNo='" + ItxtMemNo.Text + "' AND  AccType='" + ddlIAccType.SelectedValue + "' AND AccNo='" + ItxtAccNo.Text + "'";
                    int    rowEffect = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(strQuery, "A2ZCSMCUS"));


                    Success();


                    ClearInfo();

                    ItxtMemNo.Focus();
                }
            }

            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.BtnNewSanction_Click Problem');</script>");
                //throw ex;
            }
        }
        protected void GetInfo()
        {
            try
            {
                MSGFlag.Text = "0";

                Int64         AccNumber = Converter.GetLong(ItxtAccNo.Text);
                A2ZACCOUNTDTO getDTO    = (A2ZACCOUNTDTO.GetInfoAccNo(AccNumber));

                if (getDTO.a > 0)
                {
                    if (getDTO.AccStatus == 99)
                    {
                        ItxtAccNo.Text = string.Empty;
                        ItxtAccNo.Focus();
                        MSGFlag.Text = "1";

                        AccClosedMSG();
                        return;
                    }
                    else
                    {
                        lblExLoanBal.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.AccBalance));
                        decimal balance = Converter.GetDecimal(lblExLoanBal.Text);

                        ////if (balance < 0)
                        ////{
                        ////    ItxtAccNo.Text = string.Empty;
                        ////    ItxtAccNo.Focus();
                        ////    MSGFlag.Text = "1";
                        ////    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Loan Balance Not Zero');", true);
                        ////    return;
                        ////}


                        IlblExSancAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LoanAmount));
                        lblExDisbAmt.Text  = Converter.GetString(String.Format("{0:0,0.00}", getDTO.AccDisbAmt));

                        IlblExNoInstl.Text        = Converter.GetString(getDTO.NoInstallment);
                        ItxtNewNoInstal.Text      = Converter.GetString(getDTO.NoInstallment);
                        lblExistInstlAmt.Text     = Converter.GetString(String.Format("{0:0,0.00}", getDTO.MonthlyInstallment));
                        lblExistLastInstlAmt.Text = Converter.GetString(String.Format("{0:0,0.00}", getDTO.LastInstallment));
                        IlblExIntRate.Text        = Converter.GetString(String.Format("{0:0,0.00}", getDTO.InterestRate));
                        ItxtNewInterestRate.Text  = Converter.GetString(String.Format("{0:0,0.00}", getDTO.InterestRate));
                        ItxtIncreaseSanctionAmount.Focus();
                    }
                }
                else
                {
                    ItxtAccNo.Text = string.Empty;
                    ItxtAccNo.Focus();
                    MSGFlag.Text = "1";

                    AccountNotExistsMSG();
                    return;
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.GetInfo Problem');</script>");
            }
        }