Exemplo n.º 1
0
    protected void TxtPostPrd_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   GL     = BD.GetAccTypeGL(TxtPostPrd.Text, Session["BRCD"].ToString());
            string[] GLCODE = GL.Split('_');

            ViewState["DRGL"]   = GL[1].ToString();
            ViewState["GLCODE"] = GLCODE[1].ToString();
            string PDName = customcs.GetProductName(TxtPostPrd.Text, Session["BRCD"].ToString());
            if (PDName != null)
            {
                TxtPname.Text = PDName;
                TxtShort.Focus();
            }
            else
            {
                WebMsgBox.Show("Product Number is Invalid....!", this.Page);
                TxtPostPrd.Text = "";
                TxtPostPrd.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
Exemplo n.º 2
0
 protected void TxtPname_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string   CUNAME  = TxtPname.Text;
         string[] custnob = CUNAME.Split('_');
         if (custnob.Length > 1)
         {
             TxtPname.Text   = custnob[0].ToString();
             TxtPostPrd.Text = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());
             string[] AC = LI.Getaccno(TxtPostPrd.Text, Session["BRCD"].ToString()).Split('_');
             ViewState["GLCODE"] = AC[0].ToString();
             TxtShort.Focus();
         }
         else
         {
             TxtPostPrd.Focus();
             return;
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }