private void AskAndDelete() { if (MessageBox.Show("Delete Selected User ? [y/n] ") == MessageBox.MessageBoxResult.No) { return; } if (_user.Delete(_loggedUser.UserId)) { Alerts.Success("Account Deleted successfully !!!"); OnFormSaved?.Invoke(); } else { Alerts.Warning("Unable to Delete Account !!!"); } }
private void AskAndInsert() { if (MessageBox.Show($"Sign Up [y/n] ") == MessageBox.MessageBoxResult.No) { return; } UpdateUserFromTextBoxes(); if (_user.Insert()) { Alerts.Success("Account Created successfully !!!"); OnFormSaved?.Invoke(); } else { Alerts.Warning("Unable to Create Account !!!"); } }
private void AskAndUpdate() { if (MessageBox.Show("Update Selected User ? [y/n] ") == MessageBox.MessageBoxResult.No) { return; } UpdateUserFromTextBoxes(); if (_user.Update()) { Alerts.Success("Account Updated successfully !!!"); OnFormSaved?.Invoke(); } else { Alerts.Warning("Unable to Update Account !!!"); } }