protected void txtBrcode_TextChanged(object sender, EventArgs e) { try { if (txtBrcode.Text != "") { string bname = AST.GetBranchName(txtBrcode.Text); if (bname != null) { txtBranch.Text = bname; DDLReturn.Focus(); } else { WebMsgBox.Show("Enter valid Branch Code.....!", this.Page); txtBrcode.Text = ""; txtAccType.Focus(); DDLReturn.Focus(); } } else { WebMsgBox.Show("Enter Branch Code!....", this.Page); txtBrcode.Text = ""; DDLReturn.Focus(); } } catch (Exception ex) { ExceptionLogging.SendErrorToText(ex); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { if (Session["UserName"] == null) { Response.Redirect("FrmLogin.aspx"); } Bindgrid(); BD.Bindreason(DdlReason); BD.BindPercentage(DDLPercentage); BD.BindFlatCharges(DDLFLatCharges); BD.BindFrequencyType(DDLFrequency); BD.BindAllowType(DDLAllow); BD.BindSkipType(DDLSkipCharges); BD.BindRetrunType(DDLReturn); BD.BindReasons(DdlReason); txtBrcode.Text = Session["BRCD"].ToString(); txtBranch.Text = Session["BName"].ToString(); txtEffectivedate.Text = Session["EntryDate"].ToString(); BD.BindACCTYPE(Ddlacctype); txtAccType.Enabled = false; TxtTReturnType.Enabled = false; TxtSkipcharges.Enabled = false; TxtAllowTOD.Enabled = false; TxtFrequencyAppln.Enabled = false; TxtReason.Enabled = false; TxtflatChg.Enabled = false; Txtpert.Enabled = false; ClearData(); DDLReturn.Focus(); } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); //Response.Redirect("FrmLogin.aspx", true); } }