private void ResetButton() { CustomerName.Clear(); CustomerAddress.Clear(); CustomerMobile.Clear(); CustomerName.Focus(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { CustomerName.Focus(); CustomerGender.Items[0].Selected = true; } }
private void Clear() { foreach (var item in bunifuCards1.Controls.OfType <TextBox>()) { item.Clear(); } Marketplace.Text = ""; CustomerName.Focus(); }
private void Clear() { foreach (TextBox item in this.Controls.OfType <TextBox>()) { item.Clear(); } foreach (RichTextBox item in this.Controls.OfType <RichTextBox>()) { item.Clear(); } CustomerName.Focus(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserType"] == null || Convert.ToInt32(Session["UserType"]) != Global.AdminUserType) //admin { Global.Application_AccessDenied(sender, e); } else { SqlDataSource1.ConnectionString = Global.getConnectionString(); } CustomerName.Focus(); }
private bool VerifyFormData() { // ----- A customer name is required. if (CustomerName.Text.Trim().Length == 0) { MessageBox.Show("A customer name is required."); CustomerName.Focus(); return(false); } // ----- Success. return(true); }
private void Clear() { foreach (TextBox item in this.Controls.OfType <TextBox>()) { item.Clear(); } foreach (RichTextBox item in this.Controls.OfType <RichTextBox>()) { item.Clear(); } Marketplace.SelectedIndex = -1; Marketplace.Text = ""; CustomerName.Focus(); }
private bool Validationmethod() { if (CustomerName.Text.Length == 0) { errormessage1.Text = "Customer Name Cannot be Empty"; CustomerName.Focus(); return(false); } else if (cus_no.Text.Length == 0) { errormessage_cno.Text = "Enter Cusomer's NIC/TIN/Passport No"; cus_no.Focus(); return(false); } else if (AddrLine1.Text.Length == 0) { errormessage_addr1.Text = "Please fill Address Line1"; AddrLine1.Focus(); return(false); } else if (AddrLine2.Text.Length == 0) { errormessage_addr2.Text = "Please fill Address Line2"; AddrLine2.Focus(); return(false); } else if (AddrLine3.Text.Length == 0) { errormessage_addr3.Text = "Please fill City"; AddrLine3.Focus(); return(false); } else if (Payemeny_method.Text.Length == 0) { errormessage_payment.Text = "Select Payment Method"; Payemeny_method.Focus(); return(false); } if (CLT.IsChecked == false) { errormessage_checkbox.Text = "Select Atleast One CheckBox"; return(false); } if (CLW.IsChecked == false) { errormessage_checkbox.Text = "Select Atleast One CheckBox"; return(false); } if (CPS.IsChecked == false) { errormessage_checkbox.Text = "Select Atleast One CheckBox"; return(false); } if (HL.IsChecked == false) { errormessage_checkbox.Text = "Select Atleast One CheckBox"; return(false); } if (ILS.IsChecked == false) { errormessage_checkbox.Text = "Select Atleast One CheckBox"; return(false); } if ((CustomerName.Text.Length != 0) && (cus_no.Text.Length != 0) && (AddrLine1.Text.Length != 0) && (AddrLine2.Text.Length != 0) && (AddrLine3.Text.Length != 0) && (Payemeny_method.Text.Length != 0)) { errormessage1.Text = ""; CustomerName.Focus(); errormessage_cno.Text = ""; cus_no.Focus(); errormessage_addr1.Text = ""; AddrLine1.Focus(); errormessage_addr2.Text = ""; AddrLine2.Focus(); errormessage_addr3.Text = ""; AddrLine3.Focus(); errormessage_payment.Text = ""; Payemeny_method.Focus(); return(true); } return(true); }