public void ClearAllDisableBox() { tenDaiLy_txt.Clear(); diaChi_txt.Clear(); dt_txt.Clear(); Email_txt.Clear(); }
public void ClearTextBox() { Name_txt.Clear(); Address_txt.Clear(); Company_txt.Clear(); Contact_txt.Clear(); Email_txt.Clear(); }
private void Add_Click(object sender, EventArgs e) { //if (emp.Verify_User_ID(User_ID.Text).Rows.Count == 0) //{ try { emp.add_user(ID_txt.Text, Name_txt.Text, password_txt.Text, permission_combo.Text, Address_txt.Text, Email_txt.Text, isLogged_txt.Text); MessageBox.Show("The user was successfully added to the database!", "Adding user", MessageBoxButtons.OK, MessageBoxIcon.Information); ID_txt.Clear(); Name_txt.Clear(); password_txt.Clear(); Address_txt.Clear(); Email_txt.Clear(); permission_combo.Text = ""; }catch (Exception exp) { exp.ToString(); } //} //else // MessageBox.Show("This user already exist in database!", "Adding user", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); }