public ObjectEntryViewModel(Action onSave, Action onCancel, object objectToEnter, FormController formController, RecordEntryViewModelBase parentForm, string parentFormReference, IDictionary <string, IEnumerable <string> > onlyValidate = null, string saveButtonLabel = null, string cancelButtonLabel = null)
     : base(formController, parentForm, parentFormReference, onlyValidate, saveButtonLabel : saveButtonLabel, cancelButtonLabel : cancelButtonLabel)
 {
     _objectRecord = new ObjectRecord(objectToEnter);
     OnSave        = onSave;
     OnCancel      = onCancel;
     RecordType    = _objectRecord.Type;
 }
Exemple #2
0
 protected RecordEntryFormViewModel(FormController formController, RecordEntryViewModelBase parentForm, string parentFormReference, IDictionary <string, IEnumerable <string> > onlyValidate = null, string saveButtonLabel = null, string cancelButtonLabel = null)
     : this(formController, onlyValidate, saveButtonLabel : saveButtonLabel, cancelButtonLabel : cancelButtonLabel)
 {
     _parentForm          = parentForm;
     _parentFormReference = parentFormReference;
 }
 protected RecordEntryFormViewModel(FormController formController, RecordEntryViewModelBase parentForm, string parentFormReference, IDictionary <string, IEnumerable <string> > onlyValidate = null)
     : this(formController, onlyValidate)
 {
     _parentForm          = parentForm;
     _parentFormReference = parentFormReference;
 }
Exemple #4
0
 public void Execute(RecordEntryViewModelBase entryViewModel, string changeField)
 {
     Function(entryViewModel, changeField);
 }
Exemple #5
0
 public bool IsValidForForm(RecordEntryViewModelBase entryViewModel)
 {
     return(IsValidForFormFunction == null
         ? true
         : IsValidForFormFunction(entryViewModel));
 }
Exemple #6
0
 public IEnumerable <object> GetAutocompleteStrings(RecordEntryViewModelBase entryViewModel)
 {
     return(GetAutocompleteStringsFunction(entryViewModel));
 }