Exemple #1
0
    protected void TxtCRAccNo_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";
            // AT = BD.GetStage1(TxtAccno.Text, Session["BRCD"].ToString(), ViewState["Flag"].ToString());
            AT = BD.Getstage1(TxtCRAccNo.Text, Session["BRCD"].ToString(), TxtCRPType.Text);
            if (AT != "1003")
            {
                lblMessage.Text = "Sorry Customer not Authorise.........!!";
                ModalPopup.Show(this.Page);
                ClearText();
                TxtPtype.Focus();
            }
            else
            {
                int RC = LI.CheckAccount(TxtCRAccNo.Text, TxtCRPType.Text, Session["BRCD"].ToString());

                if (RC < 0)
                {
                    TxtCRAccNo.Focus();
                    WebMsgBox.Show("Please Enter valide Account Number Account Not Exist..........!!", this.Page);
                    return;
                }
                ViewState["CRCustNo"] = RC;
                TxtCRACName.Text      = AO.Getcustname(RC.ToString());
                TxtChequeNo.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Exemple #2
0
    protected void txtProdName1_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = txtProdName1.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")
                {
                    txtProdName1.Text = custnob[0].ToString();
                    txtProdType1.Text = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());

                    string[] AC = LD.Getaccno(txtProdType1.Text, Session["BRCD"].ToString()).Split('_');
                    ViewState["GLCODE1"]    = AC[0].ToString();
                    AutoAccname1.ContextKey = Session["BRCD"].ToString() + "_" + txtProdType1.Text;

                    if (Convert.ToInt32(ViewState["GLCODE1"].ToString() == "" ? "0" : ViewState["GLCODE1"].ToString()) > 100)
                    {
                        TxtAccNo1.Text   = "";
                        TxtAccName1.Text = "";

                        TxtAccNo1.Text   = txtProdType1.Text.ToString();
                        TxtAccName1.Text = txtProdName1.Text.ToString();
                        txtCustNo2.Text  = "0";

                        TxtChequeNo.Focus();
                    }
                    else
                    {
                        TxtAccNo1.Text   = "";
                        TxtAccName1.Text = "";
                        txtCustNo2.Text  = "";

                        TxtAccNo1.Focus();
                    }
                }
                else
                {
                    txtProdType1.Text = "";
                    txtProdName1.Text = "";
                    lblMessage.Text   = "Product is not operating...!!";
                    ModalPopup.Show(this.Page);
                    return;
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void txtProdType1_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AC1;
            AC1 = SC.Getaccno(txtProdType1.Text, Session["BRCD"].ToString());

            if (AC1 != null)
            {
                string[] AC = AC1.Split('_');;
                ViewState["GLCODE1"]    = AC[0].ToString();
                txtProdName1.Text       = AC[1].ToString();
                AutoAccname1.ContextKey = Session["BRCD"].ToString() + "_" + txtProdType1.Text + "_" + ViewState["GLCODE1"].ToString();

                if (Convert.ToInt32(ViewState["GLCODE1"].ToString() == "" ? "0" : ViewState["GLCODE1"].ToString()) >= 100)
                {
                    TxtAccNo1.Text   = "";
                    TxtAccName1.Text = "";

                    TxtAccNo1.Text   = txtProdType1.Text.ToString();
                    TxtAccName1.Text = txtProdName1.Text.ToString();

                    txtBalance.Text = SC.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();

                    TxtChequeNo.Focus();
                }
                else
                {
                    TxtAccNo1.Text   = "";
                    TxtAccName1.Text = "";
                    txtBalance.Text  = "";

                    TxtAccNo1.Focus();
                }
            }
            else
            {
                WebMsgBox.Show("Enter valid Product code...!!", this.Page);
                txtProdType1.Text = "";
                txtProdName1.Text = "";
                TxtAccNo1.Text    = "";
                TxtAccName1.Text  = "";
                txtBalance.Text   = "";
                txtProdType1.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void txtPayProdType_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string Stage = SR.Getaccno(txtPayBrCode.Text.Trim().ToString(), txtPayProdType.Text);

            if (Stage != null)
            {
                string[] AC = Stage.Split('_');;
                ViewState["PayGlCode"]    = AC[0].ToString();
                txtPayProdName.Text       = AC[1].ToString();
                AutoPayAccName.ContextKey = txtPayBrCode.Text.Trim().ToString() + "_" + txtPayProdType.Text.Trim().ToString() + "_" + ViewState["PayGlCode"].ToString();

                if (Convert.ToInt32(ViewState["PayGlCode"].ToString() == "" ? "0" : ViewState["PayGlCode"].ToString()) >= 100)
                {
                    TxtPayAccNo.Text   = "";
                    TxtPayAccName.Text = "";

                    TxtPayAccNo.Text   = txtPayProdType.Text.ToString();
                    TxtPayAccName.Text = txtPayProdName.Text.ToString();

                    TxtChequeNo.Focus();
                }
                else
                {
                    TxtPayAccNo.Text   = "";
                    TxtPayAccName.Text = "";

                    TxtPayAccNo.Focus();
                }
            }
            else
            {
                WebMsgBox.Show("Enter valid Product code...!!", this.Page);
                txtPayProdType.Text = "";
                txtPayProdName.Text = "";
                TxtPayAccNo.Text    = "";
                TxtPayAccName.Text  = "";
                txtPayProdType.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void TxtAccNo1_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AT = "";
            AT = BD.Getstage1(TxtAccNo1.Text, Session["BRCD"].ToString(), txtProdType1.Text);
            if (AT != null)
            {
                if (AT != "1003")
                {
                    lblMessage.Text = "Sorry Customer not Authorise.........!!";
                    ModalPopup.Show(this.Page);
                    TxtAccNo1.Text   = "";
                    TxtAccName1.Text = "";
                    TxtAccNo1.Focus();
                }
                else
                {
                    DataTable DT = new DataTable();
                    DT = SC.GetCustName(txtProdType1.Text, TxtAccNo1.Text, Session["BRCD"].ToString());
                    if (DT.Rows.Count > 0)
                    {
                        string[] CustName = DT.Rows[0]["CustName"].ToString().Split('_');
                        TxtAccName1.Text = CustName[0].ToString();

                        txtBalance.Text = SC.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), TxtAccNo1.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString();

                        TxtChequeNo.Focus();
                    }
                }
            }
            else
            {
                lblMessage.Text = "Enter valid account number...!!";
                ModalPopup.Show(this.Page);
                TxtAccNo1.Text = "";
                TxtAccNo1.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void txtProdName1_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = txtProdName1.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                txtProdName1.Text = custnob[0].ToString();
                txtProdType1.Text = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());

                string[] AC = SC.Getaccno(txtProdType1.Text, Session["BRCD"].ToString()).Split('_');
                ViewState["GLCODE1"]    = AC[0].ToString();
                AutoAccname1.ContextKey = Session["BRCD"].ToString() + "_" + txtProdType1.Text;

                if (Convert.ToInt32(ViewState["GLCODE1"].ToString() == "" ? "0" : ViewState["GLCODE1"].ToString()) >= 100)
                {
                    TxtAccNo1.Text   = "";
                    TxtAccName1.Text = "";

                    TxtAccNo1.Text   = txtProdType1.Text.ToString();
                    TxtAccName1.Text = txtProdName1.Text.ToString();

                    txtBalance.Text = SC.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();

                    TxtChequeNo.Focus();
                }
                else
                {
                    TxtAccNo1.Text   = "";
                    TxtAccName1.Text = "";
                    txtBalance.Text  = "";

                    TxtAccNo1.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void TxtAccName1_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = TxtAccName1.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                TxtAccName1.Text = custnob[0].ToString();
                TxtAccNo1.Text   = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());

                txtBalance.Text = SC.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), TxtAccNo1.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString();

                TxtChequeNo.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void txtPayProdName_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   CUNAME  = txtPayProdName.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                txtPayProdName.Text = custnob[0].ToString();
                txtPayProdType.Text = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());

                string[] AC = SR.Getaccno(txtPayBrCode.Text.Trim().ToString(), txtPayProdType.Text).Split('_');
                ViewState["PayGlCode"]    = AC[0].ToString();
                AutoPayAccName.ContextKey = txtPayBrCode.Text.Trim().ToString() + "_" + txtPayProdType.Text.Trim().ToString() + "_" + ViewState["PayGlCode"].ToString();

                if (Convert.ToInt32(ViewState["PayGlCode"].ToString() == "" ? "0" : ViewState["PayGlCode"].ToString()) >= 100)
                {
                    TxtPayAccNo.Text   = "";
                    TxtPayAccName.Text = "";

                    TxtPayAccNo.Text   = txtPayProdType.Text.ToString();
                    TxtPayAccName.Text = txtPayProdName.Text.ToString();

                    TxtChequeNo.Focus();
                }
                else
                {
                    TxtPayAccNo.Text   = "";
                    TxtPayAccName.Text = "";

                    TxtPayAccNo.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Exemple #9
0
    protected void TxtCRACName_TextChanged(object sender, EventArgs e)
    {
        string CRACName = TxtCRACName.Text;

        string[] CRACN = CRACName.Split('_');

        if (CRACN.Length > 1)
        {
            TxtCRACName.Text = CRACN[0].ToString();
            TxtCRAccNo.Text  = CRACN[1].ToString();


            int RC = LI.CheckAccount(TxtCRAccNo.Text, TxtCRPType.Text, Session["BRCD"].ToString());
            if (RC < 0)
            {
                TxtAccNo.Focus();
                WebMsgBox.Show("Please Enter valide Account Number Account Not Exist..........!!", this.Page);
                return;
            }
            ViewState["CRCustNo"] = RC;
            TxtChequeNo.Focus();
        }
    }
Exemple #10
0
    protected void txtProdType1_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string AC1;

            //Added By Amol on 22092017 as per ambika mam instruction
            if (BD.GetProdOperate(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString()).ToString() != "3")
            {
                AC1 = LD.Getaccno(txtProdType1.Text, Session["BRCD"].ToString());

                if (AC1 != null)
                {
                    string[] AC = AC1.Split('_');;
                    ViewState["GLCODE1"]    = AC[0].ToString();
                    txtProdName1.Text       = AC[1].ToString();
                    AutoAccname1.ContextKey = Session["BRCD"].ToString() + "_" + txtProdType1.Text + "_" + ViewState["GLCODE1"].ToString();

                    if (Convert.ToInt32(ViewState["GLCODE1"].ToString() == "" ? "0" : ViewState["GLCODE1"].ToString()) > 100)
                    {
                        TxtAccNo1.Text   = "";
                        TxtAccName1.Text = "";

                        TxtAccNo1.Text   = txtProdType1.Text.ToString();
                        TxtAccName1.Text = txtProdName1.Text.ToString();
                        txtCustNo2.Text  = "0";

                        TxtChequeNo.Focus();
                    }
                    else
                    {
                        TxtAccNo1.Text   = "";
                        TxtAccName1.Text = "";

                        TxtAccNo1.Focus();
                    }
                }
                else
                {
                    WebMsgBox.Show("Enter valid Product code...!!", this.Page);
                    txtProdType1.Text = "";
                    txtProdName1.Text = "";
                    TxtAccNo1.Text    = "";
                    TxtAccName1.Text  = "";

                    txtProdType1.Focus();
                }
            }
            else
            {
                txtProdType1.Text = "";
                txtProdName1.Text = "";
                lblMessage.Text   = "Product is not operating...!!";
                ModalPopup.Show(this.Page);
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }