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 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 = OW.GetOpenClose(Session["BRCD"].ToString(), txtProdType1.Text.Trim().ToString(), TxtAccNo1.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString(); Txtinstno.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); } }