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 TxtWRAMT_TextChanged(object sender, EventArgs e) { if (Convert.ToDouble(TxtACPayAmount.Text) <= Convert.ToDouble(TxtWRAMT.Text)) { double CURR, PRIN, TAMT; CURR = PRIN = TAMT = 0; CURR = Convert.ToDouble(TxtWRAMT.Text); PRIN = Convert.ToDouble(ViewState["TPAY"].ToString()); TAMT = CURR + PRIN; TxtDepoAmt.Text = TAMT.ToString(); } else { WebMsgBox.Show("Invalid Amount....!", this.Page); TxtWRAMT.Text = ""; TxtWRAMT.Focus(); } }