private void Update_Click(object sender, EventArgs e) { AdminData ad = new AdminData(); if (ad.ChangePass(this.admId, new_name.Text, new_mail.Text) == true) { MessageBox.Show("Update successfully", "Success"); Init(new_mail.Text); } else { MessageBox.Show("Sorry there is a problem.Please check again", "Error"); } }
private void metroButton5_Click(object sender, EventArgs e) { AdminData ad = new AdminData(); if (ad.ChangePass(this.admId, metroTextBox6.Text, metroTextBox5.Text) == true) { MessageBox.Show("Password Changed", "Success"); Init(); } else { MessageBox.Show("Sorry there is a problem.Please check again", "Error"); } }