protected void TxtNewAccNo_TextChanged(object sender, EventArgs e) { try { //Clear(); sResult = SV.GetAccountName(txtBrCode.Text.ToString(), txtProdCode.Text.ToString(), TxtNewAccNo.Text.ToString()); if (sResult != null) { WebMsgBox.Show("Account Already Exits...!!", this.Page); TxtNewAccName.Text = ""; TxtNewAccNo.Text = ""; TxtNewAccNo.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }
protected void txtAccNo_TextChanged(object sender, EventArgs e) { try { Clear(); sResult = SV.GetAccountName(txtBrCode.Text.ToString(), txtProdCode.Text.ToString(), txtAccNo.Text.ToString()); if (sResult != null) { string[] CT = sResult.Split('_'); if (CT.Length > 0) { txtAccName.Text = CT[0].ToString(); txtAccNo.Text = CT[1].ToString(); sResult = SV.GetAccDetails(txtBrCode.Text.ToString(), txtProdCode.Text.ToString(), txtAccNo.Text.ToString()); string[] CT1 = sResult.Split('_'); if (CT1.Length > 0) { txtAccOpenDate.Text = CT1[0].ToString(); txtAccStatus.Text = CT1[1].ToString(); txtClearBal.Text = SV.GetOpenClose(txtBrCode.Text.ToString(), txtProdCode.Text.Trim().ToString(), txtAccNo.Text.Trim().ToString(), Session["EntryDate"].ToString(), "ClBal").ToString(); if (ViewState["GlCode"].ToString() == "3") { DT = SV.AccountInfo(txtBrCode.Text.ToString(), "3", txtProdCode.Text.Trim().ToString(), txtAccNo.Text.Trim().ToString()); if (DT.Rows.Count > 0) { txtLimitAmt.Text = DT.Rows[0]["Limit"].ToString(); txtPeriod.Text = DT.Rows[0]["Period"].ToString(); txtIntRate.Text = DT.Rows[0]["IntRate"].ToString(); txtOverDue.Text = SV.OVerdueAmt(txtBrCode.Text.ToString(), txtProdCode.Text.Trim().ToString(), txtAccNo.Text.Trim().ToString(), Convert.ToDouble(txtClearBal.Text.ToString()), Session["EntryDate"].ToString()).ToString(); } } else if (ViewState["GlCode"].ToString() == "5") { DT = SV.AccountInfo(txtBrCode.Text.ToString(), "5", txtProdCode.Text.Trim().ToString(), txtAccNo.Text.Trim().ToString()); if (DT.Rows.Count > 0) { txtLimitAmt.Text = DT.Rows[0]["PrnAmt"].ToString(); txtPeriod.Text = DT.Rows[0]["Period"].ToString(); txtIntRate.Text = DT.Rows[0]["RateOfInt"].ToString(); } } } } else { WebMsgBox.Show("Customer Not Exits...!!", this.Page); txtAccName.Text = ""; txtAccNo.Text = ""; TxtNewAccNo.Focus(); } TxtNewAccNo.Focus(); } else { WebMsgBox.Show("Account Not Exits...!!", this.Page); txtAccName.Text = ""; txtAccNo.Text = ""; TxtNewAccNo.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }