示例#1
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 = OW.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 = OW.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();

                    Txtinstno.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 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 = OW.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();
                     ViewState["GLCODE"] = CustName[2].ToString();
                     txtBalance.Text     = OW.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), TxtAccNo1.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString();
                     Txtinstno.Focus();
                 }
             }
         }
         else
         {
             lblMessage.Text = "Enter valid account number...!!";
             ModalPopup.Show(this.Page);
             TxtAccNo1.Text   = "";
             TxtAccName1.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 = OW.Getaccno(txtProdType1.Text, Session["BRCD"].ToString()).Split('_');
                ViewState["GLCODE1"]    = AC[0].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 = OW.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), "0", Session["EntryDate"].ToString(), "ClBal").ToString();

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

                    TxtAccNo1.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
 // Product name for transfer
 protected void TxtProcode1_TextChanged(object sender, EventArgs e)
 {
     TxtProName1.Text = customcs.GetProductName(TxtProcode.Text, Session["BRCD"].ToString());
     TxtAccNo1.Focus();
 }
示例#6
0
    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
                {
                    AccStatus = LD.GetAccStatus(Session["BRCD"].ToString(), txtProdType1.Text, TxtAccNo1.Text);
                    if (AccStatus == "1" || AccStatus == "4")
                    {
                        DT = new DataTable();
                        DT = LD.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();
                            txtCustNo2.Text  = CustName[1].ToString();

                            txtAmount.Focus();
                        }
                    }
                    else if (AccStatus == "3")
                    {
                        TxtAccNo1.Text  = "";
                        lblMessage.Text = "Account is closed...!!";
                        ModalPopup.Show(this.Page);
                        TxtAccNo1.Focus();
                        return;
                    }
                    else
                    {
                        TxtAccNo1.Text  = "";
                        lblMessage.Text = "Enter valid account number...!!";
                        ModalPopup.Show(this.Page);
                        TxtAccNo1.Focus();
                        return;
                    }
                }
            }
            else
            {
                lblMessage.Text = "Enter valid account number...!!";
                ModalPopup.Show(this.Page);
                TxtAccNo1.Text = "";
                TxtAccNo1.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
示例#7
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);
        }
    }