protected void TxtPRDName_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (TxtBRCD.Text != "")
         {
             string   custno = TxtPRDName.Text;
             string[] CT     = custno.Split('_');
             if (CT.Length > 0)
             {
                 TxtPRDName.Text = CT[0].ToString();
                 TxtPRD.Text     = CT[1].ToString();
                 string[] GLS = BD.GetAccTypeGL(TxtPRD.Text, TxtBRCD.Text).Split('_');
                 ViewState["GL"]        = GLS[1].ToString();
                 autoglnameA.ContextKey = TxtBRCD.Text + "_" + TxtPRD.Text + "_" + ViewState["GL"].ToString();
             }
             TxtAC.Focus();
         }
         else
         {
             WebMsgBox.Show("Enter Branch Code First....!", this.Page);
             TxtPRDName.Text = "";
             TxtBRCD.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
 protected void TxtAC_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string[] AN;
         AN = customcs.GetAccountName(TxtAC.Text, TxtPRD.Text, Session["BRCD"].ToString()).Split('_');
         if (AN != null)
         {
             TxtACName.Text = AN[1].ToString();
         }
         else
         {
             WebMsgBox.Show("Account Number is Invalid....!", this.Page);
             TxtAC.Text = "";
             TxtAC.Focus();
         }
         if (TxtBRCD.Text != "" && TxtPRD.Text != "" && TxtAC.Text != "")
         {
             FL   = "ACSTATUS";
             BRCD = TxtBRCD.Text;
             PRD  = TxtPRD.Text;
             ACC  = TxtAC.Text;
             string result = CAO.SaveData(FL, TxtBRCD.Text, TxtPRD.Text, TxtAC.Text, ViewState["GL"].ToString());
             TxtAcStatus.Text = result;
         }
         if (TxtBRCD.Text != "" && TxtPRD.Text != "" && TxtAC.Text != "")
         {
             FL   = "OpBal";
             BRCD = TxtBRCD.Text;
             PRD  = TxtPRD.Text;
             ACC  = TxtAC.Text;
             string res = CAO.GetBalance(FL, TxtBRCD.Text, TxtPRD.Text, TxtAC.Text, Session["EntryDate"].ToString());
             TxtBalance.Text = res;
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
 protected void TxtACName_TextChanged1(object sender, EventArgs e)
 {
     try
     {
         string   CUNAME  = TxtACName.Text;
         string[] custnob = CUNAME.Split('_');
         if (custnob.Length > 1)
         {
             TxtACName.Text = custnob[0].ToString();
             TxtAC.Text     = custnob[1].ToString();
         }
         else
         {
             WebMsgBox.Show("Account Number is Invalid....!", this.Page);
             TxtAC.Text = "";
             TxtAC.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }