protected void TxtWRAccNo_TextChanged(object sender, EventArgs e) { string[] TD = Session["EntryDate"].ToString().Split('/'); TxtBalance.Text = OC.GetOpenClose("CLOSING", TD[2].ToString(), TD[1].ToString(), TxtWRPRCD.Text, TxtWRAccNo.Text, Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["DRGL"].ToString()).ToString(); if (TxtWRAccNo.Text == "") { TxtWRAccNo.Focus(); } DataTable dt1 = new DataTable(); if (TxtWRAccNo.Text != "" & TxtWRPRCD.Text != "") { string PRD = TxtWRPRCD.Text; string[] namecust; namecust = SC.GetAccountName(TxtWRAccNo.Text.ToString(), PRD, Session["BRCD"].ToString()).Split('_'); if (namecust.Length > 0) { ViewState["CUSTNO"] = namecust[0].ToString(); TxtWRAccName.Text = namecust[1].ToString(); if (TxtWRAccName.Text == "" & TxtWRAccNo.Text != "") { WebMsgBox.Show("Please enter valid Account number", this.Page); TxtWRAccNo.Text = ""; TxtWRAccNo.Focus(); return; } TxtWRAMT.Focus(); } } }
protected void TxtWRPRName_TextChanged(object sender, EventArgs e) { try { string GL = TxtWRPRName.Text; string[] GLS = GL.Split('_'); if (GLS.Length > 1) { TxtWRPRName.Text = GLS[0].ToString(); TxtWRPRCD.Text = GLS[1].ToString(); ViewState["DRGL"] = GLS[2].ToString(); AutoWRAccName.ContextKey = Session["BRCD"].ToString() + "_" + TxtWRPRCD.Text + "_" + ViewState["DRGL"].ToString(); if (GLS[2] != null || GLS[2] != "") { string res = BD.GetGLGroup(TxtWRPRCD.Text, Session["BRCD"].ToString(), "0"); if (res == "CBB" || res == "CAS") { TxtWRAccNo.Text = TxtWRPRCD.Text; TxtWRAccName.Text = TxtWRPRName.Text; } else { TxtWRAccNo.Focus(); TxtWRAccNo.Text = ""; TxtWRAccName.Text = ""; } } // ViewState["DRGL"] = GLT[1].ToString(); //ViewState["IR"] = GLT[2].ToString(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void TxtWRPRCD_TextChanged(object sender, EventArgs e) { try { string[] GLT = BD.GetTDAAccTypeGL(TxtWRPRCD.Text, Session["BRCD"].ToString(), "0").Split('_'); ViewState["DRGL"] = GLT[1].ToString(); TxtWRPRName.Text = GLT[0].ToString(); AutoWRAccName.ContextKey = Session["BRCD"].ToString() + "_" + TxtWRPRCD.Text + "_" + ViewState["DRGL"].ToString(); if (GLT[1] != null || GLT[1] != "") { string res = BD.GetGLGroup(TxtWRPRCD.Text, Session["BRCD"].ToString(), "0"); if (res == "CBB" || res == "CAS") { TxtWRAccNo.Text = TxtWRPRCD.Text; TxtWRAccName.Text = TxtWRPRName.Text; } else { TxtWRAccNo.Focus(); TxtWRAccNo.Text = ""; TxtWRAccName.Text = ""; } } if (TxtWRPRName.Text == "") { WebMsgBox.Show("Invalid product code", this.Page); ClearData(); TxtProcode.Focus(); return; } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }