Beispiel #1
0
 private void Btn_UpdUser_Click(object sender, EventArgs e)
 {
     try
     {
         Users_.UserName  = Txt_UpdUserName.Text;
         Users_.Password  = Txt_UpdPassword.Text;
         Users_.Email     = Txt_UpdEmail.Text;
         Users_.Available = true;
         WriteServicesUsers_.UpdateUser(Users_);
         MessageBox.Show("User has been update");
         SetDataGridView();
         CleanText();
         GBox_AddUser.Enabled = true;
         GBox_UpdUser.Enabled = false;
         GBox_DelUser.Enabled = false;
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
 private void Btn_SetNewPassword_Click(object sender, EventArgs e)
 {
     try
     {
         WriteServicesUsers_ = new WriteServicesUsers();
         Users_.Password     = Txt_NewPassword.Text;
         Users_.Available    = true;
         WriteServicesUsers_.UpdateUser(Users_);
         MessageBox.Show("Password saved");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         WriteServicesUsers_ = null;
         Users_ = null;
         Txt_NewPassword.Text     = "";
         GBox_NewPassword.Enabled = false;
         GBox_Email.Enabled       = true;
     }
 }