protected void TxtAcctypeName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   custno = TxtAcctypeName.Text;
            string[] CT     = custno.Split('_');
            if (CT.Length > 0)
            {
                TxtAcctypeName.Text = CT[0].ToString();
                TxtAccType.Text     = CT[1].ToString();
                //TxtGLCD.Text = CT[2].ToString();
                string[] GLS = BD.GetAccTypeGL(TxtAccType.Text, Session["BRCD"].ToString()).Split('_');
                ViewState["GL"]        = GLS[1].ToString();
                AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtAccType.Text + "_" + ViewState["GL"].ToString();

                int GL = 0;
                int.TryParse(ViewState["GL"].ToString(), out GL);
                TxtAccNo.Focus();


                if (TxtAcctypeName.Text == "")
                {
                    WebMsgBox.Show("Please enter valid Product code", this.Page);
                    TxtAccType.Text = "";
                    TxtAccType.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
예제 #2
0
 protected void TxtPname_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string   CUNAME  = TxtPname.Text;
         string[] custnob = CUNAME.Split('_');
         if (custnob.Length > 1)
         {
             //Added By Amol on 22092017 as per ambika mam instruction
             if (BD.GetProdOperate(Session["BRCD"].ToString(), string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString()).ToString() != "3")
             {
                 TxtPname.Text = custnob[0].ToString();
                 TxtPtype.Text = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
                 string[] GL = BD.GetAccTypeGL(TxtPtype.Text, Session["BRCD"].ToString()).Split('_');
                 ViewState["GL"]        = GL[1].ToString();
                 AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtPtype.Text.ToString() + "_" + ViewState["GL"];
                 //Added By AmolB ON 20170131 for Check GlgGroup
                 ViewState["GLGroup"] = LD.CheckGlGroup(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString());
                 TxtAccNo.Focus();
             }
             else
             {
                 TxtPtype.Text   = "";
                 TxtPname.Text   = "";
                 lblMessage.Text = "Product is not operating...!!";
                 ModalPopup.Show(this.Page);
                 return;
             }
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
예제 #3
0
    protected void TxtAccNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";
            // AT = BD.GetStage1(TxtAccno.Text, Session["BRCD"].ToString(), ViewState["Flag"].ToString());
            AT = BD.Getstage1(TxtAccNo.Text, Session["BRCD"].ToString(), TxtPtype.Text);
            if (AT != "1003")
            {
                lblMessage.Text = "Sorry Customer not Authorise.........!!";
                ModalPopup.Show(this.Page);
                ClearText();
                TxtPtype.Focus();
            }
            else
            {
                int RC = LI.CheckAccount(TxtAccNo.Text, TxtPtype.Text, Session["BRCD"].ToString());

                if (RC < 0)
                {
                    TxtAccNo.Focus();
                    WebMsgBox.Show("Please Enter valide Account Number Account Not Exist..........!!", this.Page);
                    return;
                }
                ViewState["CustNo"] = RC;
                TxtCustName.Text    = AO.Getcustname(RC.ToString());
                TxtCRGLCD.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #4
0
    protected void TxtCustName_TextChanged(object sender, EventArgs e)
    {
        string[] TD = TxtCustName.Text.Split('_');
        if (TD.Length > 1)
        {
            TxtCustName.Text = TD[0].ToString();
            TxtAccNo.Text    = TD[1].ToString();
            txtCustNo.Text   = TD[2].ToString();

            if (Convert.ToInt32(txtCustNo.Text.Trim().ToString() == "" ? "0" : txtCustNo.Text.Trim().ToString()) < 0)
            {
                TxtAccNo.Text    = "";
                TxtCustName.Text = "";
                txtCustNo.Text   = "";
                TxtBalance.Text  = "";
                TxtTotalBal.Text = "";
                TxtAccNo.Focus();
                WebMsgBox.Show("Please Enter valid Account Number Customer Not Exist...!!", this.Page);
                return;
            }

            TxtBalance.Text  = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString();
            TxtTotalBal.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString(), Session["EntryDate"].ToString(), "MainBal").ToString();

            if (TxtAccNo.Text != "" && TxtPtype.Text != "")
            {
                DataTable dtmodal = new DataTable();
                string    sql1    = "EXEC A_VOUCHINFO 'MODAL','" + TxtPtype.Text + "','" + ViewState["LoanBrCode"].ToString() + "','" + conn.ConvertDate(Session["ENTRYDATE"].ToString()) + "','" + TxtAccNo.Text + "'";
                dtmodal = conn.GetDatatable(sql1);
                if (dtmodal.Rows.Count > 0)
                {
                    resultout = CR.GetInfo(GrdView, ViewState["LoanBrCode"].ToString(), Session["ENTRYDATE"].ToString(), TxtAccNo.Text, TxtPtype.Text);
                    if (resultout > 0)
                    {
                        string Modal_Flag            = "VOUCHERVIEW";
                        System.Text.StringBuilder sb = new System.Text.StringBuilder();

                        sb.Append(@"<script type='text/javascript'>");
                        sb.Append("$('#" + Modal_Flag + "').modal('show');");
                        sb.Append(@"</script>");

                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddShowModalScript", sb.ToString(), false);
                    }
                }
            }
            TxtNarration.Focus();
        }
        else
        {
            lblMessage.Text = "Enter Valid Account Number...!!";
            ModalPopup.Show(this.Page);
            TxtAccNo.Text    = "";
            TxtCustName.Text = "";
            txtCustNo.Text   = "";
            TxtBalance.Text  = "";
            TxtTotalBal.Text = "";
            TxtAccNo.Focus();
        }
    }
    protected void TxtAccName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string ACST = "";
            ACST = OC.GETACCStatus(Session["BRCD"].ToString(), TxtAccNo.Text, TxtProcode.Text);
            if (ACST != "3")
            {
                TxtACStatus.Text = "Normal/Operative";
                string   CUNAME  = TxtAccName.Text;
                string[] custnob = CUNAME.Split('_');
                if (custnob.Length > 1)
                {
                    TxtAccName.Text = custnob[0].ToString();
                    TxtAccNo.Text   = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
                    TxtCustNo.Text  = custnob[2].ToString();
                    string[] TD = Session["EntryDate"].ToString().Split('/');

                    GetOpening();
                    GetBal();
                    GetIDetails();
                    GetLID();
                    GetChrgs("UCC");
                    GetChrgs("MCM");

                    if (TxtAccNo.Text == "")
                    {
                        TxtAccName.Text = "";
                        return;
                    }
                    TxtBookUnused.Focus();
                }
                else
                {
                    lblMessage.Text = "";
                    lblMessage.Text = "Invalid Account Number.........!!";
                    ModalPopup.Show(this.Page);
                    TxtAccNo.Focus();
                    return;
                }
            }

            else
            {
                WebMsgBox.Show("Account already closed!...", this.Page);
                Clear();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
예제 #6
0
    protected void TxtPname_TextChanged(object sender, EventArgs e)
    {
        string[] TD = TxtPname.Text.Split('_');
        if (TD.Length > 1)
        {
            TxtPname.Text = TD[0].ToString();
            TxtPtype.Text = TD[1].ToString();

            string[] AC = MV.Getaccno(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString()).Split('_');
            ViewState["GlCode"]    = AC[0].ToString();
            AutoAccname.ContextKey = ViewState["LoanBrCode"].ToString() + "_" + TxtPtype.Text;

            string YN = CC.GetIntACCYN(ViewState["LoanBrCode"].ToString(), TxtPtype.Text);
            if (Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()) >= 100 && YN != "Y")
            {
                TxtAccNo.Text    = "";
                TxtCustName.Text = "";
                txtCustNo.Text   = "";
                TxtBalance.Text  = "";
                TxtTotalBal.Text = "";

                TxtAccNo.Text    = TxtPtype.Text.ToString();
                TxtCustName.Text = TxtPname.Text.ToString();
                txtCustNo.Text   = "0";

                string[] DTE = Session["EntryDate"].ToString().Split('/');
                TxtBalance.Text  = OC.GetOpenClose("CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();
                TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();

                //TxtBalance.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();
                //TxtTotalBal.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "MainBal").ToString();

                TxtNarration.Focus();
            }
            else
            {
                TxtAccNo.Text    = "";
                TxtCustName.Text = "";
                TxtBalance.Text  = "";
                TxtTotalBal.Text = "";
                hdfGlCode.Value  = Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()).ToString();

                TxtAccNo.Focus();
            }
        }
        else
        {
            lblMessage.Text = "Enter Valid Product code...!!";
            ModalPopup.Show(this.Page);
            ClearText();
            TxtPtype.Focus();
        }
    }
    public void productcd()
    {
        try
        {
            if (TxtProcode.Text == "")
            {
                TxtProName.Text = "";
                TxtAccNo.Focus();
                goto ext;
            }

            //Added By Amol on 22092017 as per ambika mam instruction
            if (BD.GetProdOperate(Session["BRCD"].ToString(), TxtProcode.Text.Trim().ToString()).ToString() != "3")
            {
                int    result = 0;
                string GlS1;
                int.TryParse(TxtProcode.Text, out result);
                TxtProName.Text = customcs.GetProductName(result.ToString(), Session["BRCD"].ToString());
                GlS1            = BD.GetAccTypeGL(TxtProcode.Text, Session["BRCD"].ToString());
                if (GlS1 != null)
                {
                    string[] GLS = GlS1.Split('_');
                    ViewState["DRGL"]      = GLS[1].ToString();
                    AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtProcode.Text + "_" + ViewState["DRGL"].ToString();
                    int GL = 0;
                    int.TryParse(ViewState["DRGL"].ToString(), out GL);
                    TxtAccNo.Focus();
                }
                else
                {
                    WebMsgBox.Show("Enter Valid Product code!....", this.Page);
                    TxtProcode.Text = "";
                    TxtProName.Text = "";
                    TxtProcode.Focus();
                }
            }
            else
            {
                TxtProcode.Text = "";
                TxtProName.Text = "";
                lblMessage.Text = "Product is not operating...!!";
                ModalPopup.Show(this.Page);
                return;
            }
            ext :;
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
예제 #8
0
 protected void TxtPtype_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string[] GL = BD.GetAccTypeGL(TxtPtype.Text, Session["BRCD"].ToString()).Split('_');
         TxtPname.Text   = GL[0].ToString();
         ViewState["GL"] = GL[1].ToString();
         //TxtPname.Text = BD.GetAccType(TxtPtype.Text, Session["BRCD"].ToString());
         AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtPtype.Text + "_" + ViewState["GL"].ToString();
         TxtAccNo.Focus();
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
    protected void TxtProName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   custno = TxtProName.Text;
            string[] CT     = custno.Split('_');
            if (CT.Length > 0)
            {
                //Added By Amol on 22092017 as per ambika mam instruction
                if (BD.GetProdOperate(Session["BRCD"].ToString(), CT[1].ToString()).ToString() != "3")
                {
                    TxtProName.Text = CT[0].ToString();
                    TxtProcode.Text = CT[1].ToString();
                    //TxtGLCD.Text = CT[2].ToString();
                    string[] GLS = BD.GetAccTypeGL(TxtProcode.Text, Session["BRCD"].ToString()).Split('_');
                    ViewState["DRGL"]      = GLS[1].ToString();
                    AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtProcode.Text + "_" + ViewState["DRGL"].ToString();

                    int GL = 0;
                    int.TryParse(ViewState["DRGL"].ToString(), out GL);
                    TxtAccNo.Focus();
                    if (TxtProName.Text == "")
                    {
                        WebMsgBox.Show("Please enter valid Product code", this.Page);
                        TxtProcode.Text = "";
                        TxtProcode.Focus();
                    }
                }
                else
                {
                    TxtProName.Text = "";
                    TxtProcode.Text = "";
                    lblMessage.Text = "Product is not operating...!!";
                    ModalPopup.Show(this.Page);
                    return;
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
예제 #10
0
    protected void TxtPtype_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string GL1;

            //Added By Amol on 22092017 as per ambika mam instruction
            if (BD.GetProdOperate(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString()).ToString() != "3")
            {
                GL1 = BD.GetAccTypeGL(TxtPtype.Text, Session["BRCD"].ToString());
                if (GL1 != null)
                {
                    string[] GL = GL1.Split('_');
                    TxtPname.Text          = GL[0].ToString();
                    ViewState["GL"]        = GL[1].ToString();
                    AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtPtype.Text + "_" + ViewState["GL"].ToString();
                    //Added By AmolB ON 20170131 for Check GlgGroup
                    ViewState["GLGroup"] = LD.CheckGlGroup(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString());
                    TxtAccNo.Focus();
                }
                else
                {
                    WebMsgBox.Show("Enter valid product code!....", this.Page);
                    TxtPtype.Focus();
                    TxtPtype.Text = "";
                }
            }
            else
            {
                TxtPtype.Text   = "";
                TxtPname.Text   = "";
                lblMessage.Text = "Product is not operating...!!";
                ModalPopup.Show(this.Page);
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #11
0
    protected void TxtAccType_TextChanged(object sender, EventArgs e)
    {
        try
        {
            if (TxtAccType.Text == "")
            {
                TxtAcctypeName.Text = "";
                TxtAccNo.Focus();
                goto ext;
            }
            int    result = 0;
            string GlS1;
            int.TryParse(TxtAccType.Text, out result);
            TxtAcctypeName.Text = customcs.GetProductName(result.ToString(), Session["BRCD"].ToString());
            GlS1 = BD.GetAccTypeGL(TxtAccType.Text, Session["BRCD"].ToString());
            if (GlS1 != null)
            {
                string[] GLS = GlS1.Split('_');
                ViewState["GL"]        = GLS[1].ToString();
                AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + TxtAccType.Text + "_" + ViewState["GL"].ToString();
                int GL = 0;
                int.TryParse(ViewState["GL"].ToString(), out GL);
                TxtAccNo.Focus();
            }
            else
            {
                WebMsgBox.Show("Enter Valid Product code!....", this.Page);
                TxtAccType.Text     = "";
                TxtAcctypeName.Text = "";
                TxtAccType.Focus();
            }

            ext :;
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
예제 #12
0
    protected void TxtCustName_TextChanged(object sender, EventArgs e)
    {
        string CustName = TxtCustName.Text;

        string[] CN = CustName.Split('_');

        if (CN.Length > 1)
        {
            TxtCustName.Text = CN[0].ToString();
            TxtAccNo.Text    = CN[1].ToString();

            int RC = LI.CheckAccount(TxtAccNo.Text, TxtPtype.Text, Session["BRCD"].ToString());
            if (RC < 0)
            {
                TxtAccNo.Focus();
                WebMsgBox.Show("Please Enter valide Account Number Account Not Exist..........!!", this.Page);
                return;
            }
            ViewState["CustNo"] = RC;
            TxtCRGLCD.Focus();
        }
    }
예제 #13
0
    protected void TxtCustName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";

            string   CUNAME  = TxtCustName.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                TxtCustName.Text = custnob[0].ToString();
                TxtAccNo.Text    = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
            }

            AT = BD.Getstage1(TxtAccNo.Text, Session["BRCD"].ToString(), TxtPtype.Text);
            if (AT != null)
            {
                if (AT != "1003")
                {
                    lblMessage.Text = "Sorry Customer Not Authorise...!!";
                    ModalPopup.Show(this.Page);
                }
                else
                {
                    //Added By AmolB ON 20170131 for Loan Against Gold
                    if (ViewState["GLGroup"].ToString() == "LAG")
                    {
                        Result = LD.CheckRecords(Session["BRCD"].ToString(), TxtPtype.Text, TxtAccNo.Text);

                        if (Result < 1)
                        {
                            TxtPtype.Text    = "";
                            TxtPname.Text    = "";
                            TxtAccNo.Text    = "";
                            TxtCustName.Text = "";

                            lblMessage.Text = "First Enter Ornament Details...!!";
                            ModalPopup.Show(this.Page);
                            return;
                        }
                    }

                    ST = LD.CheckAccount(TxtAccNo.Text, TxtPtype.Text, Session["BRCD"].ToString());
                    if (ST != null)
                    {
                        TxtCustName.Text = AO.Getcustname(ST.ToString());
                        txtCustNo1.Text  = ST.ToString();

                        DT = LD.GetDisburstAMT(TxtPtype.Text, TxtAccNo.Text, Session["EntryDate"].ToString(), Session["BRCD"].ToString());
                        if (Convert.ToDouble(DT.Rows[0]["Limit"].ToString()) == -1)
                        {
                            WebMsgBox.Show("Sorry Not having Disburstment Amount...!!", this.Page);
                            ClearData();
                            TxtPtype.Focus();
                            return;
                        }
                        else
                        {
                            ShowLoanDetails();
                            string LoanCat = LD.GetLoancat(Session["BRCD"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString());

                            if (LoanCat != null && LoanCat == "CCOD")
                            {
                                string[] TD = Session["EntryDate"].ToString().Split('/');
                                TxtBalance.Text  = OC.GetOpenClose("CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();
                                TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();

                                DisbAmount        = Convert.ToDouble(Convert.ToDouble(txtLimitAmt.Text.Trim().ToString()) - Math.Abs(Convert.ToDouble(TxtTotalBal.Text.Trim().ToString())));
                                TxtDSAmt.Text     = (DisbAmount > 0 ? DisbAmount : 0).ToString();
                                txtDrAmount.Text  = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                                hdnLimitAmt.Value = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                            }
                            else
                            {
                                string[] TD = Session["EntryDate"].ToString().Split('/');
                                TxtBalance.Text  = OC.GetOpenClose("CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();
                                TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", TD[2].ToString(), TD[1].ToString(), TxtPtype.Text, TxtAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GL"].ToString()).ToString();

                                DisbAmount        = Convert.ToDouble(Convert.ToDouble(txtLimitAmt.Text.Trim().ToString()) - Math.Abs(Convert.ToDouble(TxtTotalBal.Text.Trim().ToString())));
                                TxtDSAmt.Text     = (DisbAmount > 0 ? DisbAmount : 0).ToString();
                                txtDrAmount.Text  = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                                hdnLimitAmt.Value = Convert.ToDouble(TxtDSAmt.Text.Trim().ToString()).ToString();
                            }
                            TxtDSAmt.Focus();
                            DivPayment.Visible = true;
                        }
                    }
                    else
                    {
                        TxtAccNo.Focus();
                        WebMsgBox.Show("Please Enter valid Account Number.. Account Not Exist...!!", this.Page);
                        return;
                    }
                    BindTempGrid();
                }
            }
            else
            {
                WebMsgBox.Show("Enter valid account number...!!", this.Page);
                TxtAccNo.Focus();
                TxtAccNo.Text = "";
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #14
0
    protected void TxtAccNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";

            AT = BD.Getstage1(TxtAccNo.Text, ViewState["LoanBrCode"].ToString(), TxtPtype.Text);
            if (AT != null)
            {
                if (AT != "1003")
                {
                    lblMessage.Text = "Sorry Customer not Authorise...!!";
                    ModalPopup.Show(this.Page);
                    TxtAccNo.Text    = "";
                    TxtCustName.Text = "";
                    txtCustNo.Text   = "";
                    TxtBalance.Text  = "";
                    TxtTotalBal.Text = "";
                    TxtAccNo.Focus();
                }
                else
                {
                    DataTable DT = new DataTable();
                    DT = MV.GetCustName(TxtPtype.Text, TxtAccNo.Text, ViewState["LoanBrCode"].ToString());
                    if (DT.Rows.Count > 0)
                    {
                        string[] CustName = DT.Rows[0]["CustName"].ToString().Split('_');

                        TxtCustName.Text = CustName[0].ToString();
                        txtCustNo.Text   = CustName[1].ToString();

                        if (Convert.ToInt32(txtCustNo.Text.Trim().ToString() == "" ? "0" : txtCustNo.Text.Trim().ToString()) < 0)
                        {
                            TxtAccNo.Text    = "";
                            TxtCustName.Text = "";
                            txtCustNo.Text   = "";
                            TxtBalance.Text  = "";
                            TxtTotalBal.Text = "";
                            TxtAccNo.Focus();
                            WebMsgBox.Show("Please Enter valid Account Number Customer Not Exist...!!", this.Page);
                            return;
                        }

                        TxtBalance.Text  = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString();
                        TxtTotalBal.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString(), Session["EntryDate"].ToString(), "MainBal").ToString();

                        DebitAmt = MV.DebitAmount(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), TxtAccNo.Text.Trim().ToString(), Session["EntryDate"].ToString(), Session["Mid"].ToString());
                        if (DebitAmt.ToString() != "")
                        {
                            TxtBalance.Text = (Convert.ToDouble(TxtBalance.Text) - Convert.ToDouble(DebitAmt)).ToString();
                        }

                        TxtNarration.Focus();
                    }
                    if (TxtAccNo.Text != "" && TxtPtype.Text != "")
                    {
                        DataTable dtmodal = new DataTable();
                        string    sql1    = "EXEC A_VOUCHINFO 'MODAL','" + TxtPtype.Text + "','" + ViewState["LoanBrCode"].ToString() + "','" + conn.ConvertDate(Session["ENTRYDATE"].ToString()) + "','" + TxtAccNo.Text + "'";
                        dtmodal = conn.GetDatatable(sql1);
                        if (dtmodal.Rows.Count > 0)
                        {
                            resultout = CR.GetInfo(GrdView, ViewState["LoanBrCode"].ToString(), Session["ENTRYDATE"].ToString(), TxtAccNo.Text, TxtPtype.Text);
                            if (resultout > 0)
                            {
                                string Modal_Flag            = "VOUCHERVIEW";
                                System.Text.StringBuilder sb = new System.Text.StringBuilder();

                                sb.Append(@"<script type='text/javascript'>");
                                sb.Append("$('#" + Modal_Flag + "').modal('show');");
                                sb.Append(@"</script>");

                                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddShowModalScript", sb.ToString(), false);
                            }
                        }
                    }
                }
            }
            else
            {
                lblMessage.Text = "Enter Valid Account Number...!!";
                ModalPopup.Show(this.Page);
                TxtAccNo.Text    = "";
                TxtCustName.Text = "";
                txtCustNo.Text   = "";
                TxtBalance.Text  = "";
                TxtTotalBal.Text = "";
                TxtAccNo.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #15
0
    protected void TxtPtype_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AC1;

            AC1 = MV.Getaccno(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString());

            if (AC1 != null)
            {
                string[] AC = AC1.Split('_');;
                ViewState["GlCode"]    = AC[0].ToString();
                TxtPname.Text          = AC[1].ToString();
                AutoAccname.ContextKey = ViewState["LoanBrCode"].ToString() + "_" + TxtPtype.Text + "_" + ViewState["GlCode"].ToString();

                string YN = CC.GetIntACCYN(ViewState["LoanBrCode"].ToString(), TxtPtype.Text);
                if (Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()) >= 100 && YN != "Y") //--abhishek as per GL LEVEL Requirment
                {
                    TxtAccNo.Text    = "";
                    TxtCustName.Text = "";
                    txtCustNo.Text   = "";
                    TxtBalance.Text  = "";
                    TxtTotalBal.Text = "";

                    TxtAccNo.Text    = TxtPtype.Text.ToString();
                    TxtCustName.Text = TxtPname.Text.ToString();
                    txtCustNo.Text   = "0";

                    string[] DTE = Session["EntryDate"].ToString().Split('/');
                    TxtBalance.Text  = OC.GetOpenClose("CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();
                    TxtTotalBal.Text = OC.GetOpenClose("MAIN_CLOSING", DTE[2].ToString(), DTE[1].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["GlCode"].ToString()).ToString();

                    //TxtBalance.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();
                    //TxtTotalBal.Text = MV.GetOpenClose(ViewState["LoanBrCode"].ToString(), TxtPtype.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "MainBal").ToString();

                    TxtNarration.Focus();
                }
                else
                {
                    TxtAccNo.Text    = "";
                    TxtCustName.Text = "";
                    TxtBalance.Text  = "";
                    TxtTotalBal.Text = "";
                    hdfGlCode.Value  = Convert.ToInt32(ViewState["GlCode"].ToString() == "" ? "0" : ViewState["GlCode"].ToString()).ToString();

                    TxtAccNo.Focus();
                }
            }
            else
            {
                lblMessage.Text = "Enter Valid Product code...!!";
                ModalPopup.Show(this.Page);
                ClearText();
                TxtPtype.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    public void accno()
    {
        try
        {
            string AT   = "";
            string ACST = "";
            ACST = OC.GETACCStatus(Session["BRCD"].ToString(), TxtAccNo.Text, TxtProcode.Text);
            if (ACST != "3")
            {
                AT = BD.Getstage1(TxtAccNo.Text, Session["BRCD"].ToString(), TxtProcode.Text);
                if (AT != null)
                {
                    if (AT != "1003")
                    {
                        lblMessage.Text = "Sorry Customer not Authorise.........!!";
                        ModalPopup.Show(this.Page);
                        //  Clear();
                    }
                    else
                    {
                        TxtACStatus.Text = "Normal/Operative";
                        string[] TD = Session["EntryDate"].ToString().Split('/');

                        if (TxtAccNo.Text == "")
                        {
                            TxtAccName.Text = "";
                            goto ext;
                        }

                        DataTable dt1 = new DataTable();
                        if (TxtAccNo.Text != "" & TxtProcode.Text != "")
                        {
                            string   PRD = "";
                            string[] CN;
                            PRD = TxtProcode.Text;
                            CN  = customcs.GetAccountName(TxtAccNo.Text.ToString(), PRD, Session["BRCD"].ToString()).Split('_');
                            ViewState["CUSTNO"] = CN[0].ToString();
                            TxtCustNo.Text      = CN[0].ToString();
                            TxtAccName.Text     = CN[1].ToString();

                            GetOpening();
                            GetBal();
                            GetIDetails();
                            GetLID();
                            GetChrgs("UCC");
                            GetChrgs("MCM");

                            if (TxtAccName.Text == "" & TxtAccNo.Text != "")
                            {
                                WebMsgBox.Show("Please enter valid Account number", this.Page);
                                TxtAccNo.Text = "";
                                TxtAccNo.Focus();
                                return;
                            }
                            TxtBookUnused.Focus();
                        }

                        if (TxtAccNo.Text == "" || TxtProcode.Text == "")
                        {
                            TxtAccName.Text = "";
                            goto ext;
                        }
                        dt1 = customcs.GetAccNoAccType(TxtProcode.Text, TxtAccNo.Text, Session["BRCD"].ToString());

                        if (dt1 != null && dt1.Rows.Count != 0)
                        {
                        }
                        else
                        {
                        }
                        ext :;
                    }
                }
                else
                {
                    WebMsgBox.Show("Enter Valid Account number!...", this.Page);
                    TxtAccNo.Text = "";
                    TxtAccNo.Focus();
                }
            }
            else
            {
                WebMsgBox.Show("Account No. " + TxtAccNo.Text + " already closed!...", this.Page);
                Clear();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }
예제 #17
0
    protected void TxtAccNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";
            // AT = BD.GetStage1(TxtAccno.Text, Session["BRCD"].ToString(), ViewState["Flag"].ToString());
            AT = BD.Getstage1(TxtAccNo.Text, Session["BRCD"].ToString(), TxtAccType.Text);
            if (AT != null)
            {
                if (AT != "1003")
                {
                    lblMessage.Text = "Sorry Customer not Authorise.........!!";
                    ModalPopup.Show(this.Page);
                    Clear();
                }
                else
                {
                    if (TxtAccNo.Text == "")
                    {
                        TxtAccName.Text = "";
                        goto ext;
                    }

                    DataTable dt1 = new DataTable();
                    if (TxtAccNo.Text != "" & TxtAccType.Text != "")
                    {
                        string   PRD = "";
                        string[] CN;
                        PRD = TxtAccType.Text;
                        CN  = customcs.GetAccountName(TxtAccNo.Text.ToString(), PRD, Session["BRCD"].ToString()).Split('_');
                        ViewState["CUSTNO"] = CN[0].ToString();
                        TxtAccName.Text     = CN[1].ToString();
                        if (TxtAccName.Text == "" & TxtAccNo.Text != "")
                        {
                            WebMsgBox.Show("Please enter valid Account number", this.Page);
                            TxtAccNo.Text = "";
                            TxtAccNo.Focus();
                            return;
                        }

                        string FL = "";
                        if (DdlReturnType.SelectedValue == "1")
                        {
                            FL = "I";
                        }
                        else if (DdlReturnType.SelectedValue == "2")
                        {
                            FL = "O";
                        }
                        string CHCNT = "";
                        CHCNT = RI.GetChqCount(Session["BRCD"].ToString(), TxtCheqNo.Text, FL, Session["EntryDate"].ToString(), TxtAccType.Text, TxtAccNo.Text, "ACCH");
                        if (Convert.ToInt32(CHCNT) <= 0)
                        {
                            DataTable DT = new DataTable();
                            DT = RI.GetInfo(Session["BRCD"].ToString(), DdlReturnType.SelectedValue.ToString(), TxtAccType.Text, TxtAccNo.Text, TxtCheqNo.Text, TxtCheqDate.Text, Session["EntryDate"].ToString());
                            if (DT.Rows.Count > 0)
                            {
                                TxtAccType.Text       = DT.Rows[0]["PRDUCT_CODE"].ToString();
                                TxtAccNo.Text         = DT.Rows[0]["ACC_NO"].ToString();
                                TxtBankCD.Text        = DT.Rows[0]["BANK_CODE"].ToString();
                                TxtBankName.Text      = DT.Rows[0]["BankName"].ToString();
                                TxtBRCD.Text          = DT.Rows[0]["BRANCH_CODE"].ToString();
                                TxtBRCDName.Text      = DT.Rows[0]["BranchName"].ToString();
                                TxtNarration.Text     = DT.Rows[0]["PARTICULARS"].ToString();
                                TxtCheqDate.Text      = DT.Rows[0]["INSTRUDATE"].ToString().Replace("12:00:00", "");
                                TxtCheqNo.Text        = DT.Rows[0]["INSTRU_NO"].ToString();
                                TxtCAmount.Text       = DT.Rows[0]["INSTRU_AMOUNT"].ToString();
                                ViewState["CUSTNO"]   = DT.Rows[0]["CUSTNO"].ToString();
                                ViewState["CUSTNAME"] = DT.Rows[0]["CUSTNAME"].ToString();
                                NEWENDN(false);
                                ////added by ankita on 20/07/2017
                                SumIwOw();
                                Photo_Sign();
                            }

                            else
                            {
                                WebMsgBox.Show("No Records Found.....!", this.Page);
                                Clear();
                            }
                        }
                        else
                        {
                            WebMsgBox.Show("Chq No. " + TxtCheqNo.Text + " is Already Returned...! ", this.Page);
                            Clear();
                            DdlReturnType.Focus();
                        }
                    }

                    if (TxtAccNo.Text == "" || TxtAccType.Text == "")
                    {
                        TxtAccName.Text = "";
                        goto ext;
                    }
                    dt1 = customcs.GetAccNoAccType(TxtAccType.Text, TxtAccNo.Text, Session["BRCD"].ToString());

                    if (dt1 != null && dt1.Rows.Count != 0)
                    {
                    }
                    else
                    {
                    }
                    ext :;
                }
            }
            else
            {
                WebMsgBox.Show("Enter Valid Account number!...", this.Page);
                TxtAccNo.Text = "";
                TxtAccNo.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
            //Response.Redirect("FrmLogin.aspx", true);
        }
    }