private void AskAndDelete() { if (MessageBox.Show("Delete Selected Message ? [y/n] ") == MessageBox.MessageBoxResult.No) { return; } if (_message.Delete()) { Alerts.Success("Message deleted successfully !!!"); MessageToFile.Delete(_message); } else { Alerts.Warning("Unable to delete Message !!!"); } }
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 !!!"); } }
private void AskAndInsert() { if (MessageBox.Show($"Send Message [y/n] ") == MessageBox.MessageBoxResult.No) { return; } _message.Subject = this["Subject"]; _message.Body = this["Body"]; if (_message.Insert()) { Alerts.Success("Message Sent successfully !!!"); MessageToFile.Save(_message); } else { Alerts.Warning("Unable to Send Message !!!"); } }
private void AskAndUpdate() { if (MessageBox.Show("Edit Selected Message ? [y/n] ") == MessageBox.MessageBoxResult.No) { return; } _message.Subject = this["Subject"]; _message.Body = this["Body"]; if (_message.Update()) { Alerts.Success("Message Updated successfully !!!"); MessageToFile.Save(_message); } else { Alerts.Warning("Unable to Update Message !!!"); } }