protected void fireChangesMade() { if (ChangesMade != null) { ChangesMade.Invoke(this); } }
internal void _fireApplyChanges() { if (ChangesMade != null) { ChangesMade.Invoke(element); } }
private void btnConfirm_Click(object sender, RoutedEventArgs e) { if (type == WindowType.NewEntity) { //fitnessClass.Discipline = cmbDisciplines.SelectedItem as Discipline; //fitnessClass.Instructor = cmbInstructor.SelectedItem as Instructor; //fitnessClass.Gym = cmbGym.SelectedItem as Gym; fitnessClass = service.AddFitnessClass(fitnessClass); } else { fitnessClass = service.EditFitnessClass(fitnessClass); } this.Close(); ChangesMade?.Invoke(fitnessClass); }
/// <summary> /// Validates this object /// </summary> /// <param name="path">The path to this object as a string</param> /// <param name="messages">the validation messages to date, these may be added to within this method</param> void IMedicationHistory.Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); if (vb.ArgumentRequiredCheck("ItemStatus", ItemStatus)) { if (ItemStatus != null) { ItemStatus.ValidateMandatory(path + ".ItemStatus", messages); } } if (vb.ArgumentRequiredCheck("ChangesMade", ChangesMade)) { if (ChangesMade != null) { ChangesMade.ValidateMandatory(path + ".ChangesMade", messages); } } }