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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 public void Execute(RecordEntryViewModelBase entryViewModel, string changeField)
 {
     Function(entryViewModel, changeField);
 }
Ejemplo n.º 5
0
 public bool IsValidForForm(RecordEntryViewModelBase entryViewModel)
 {
     return(IsValidForFormFunction == null
         ? true
         : IsValidForFormFunction(entryViewModel));
 }
Ejemplo n.º 6
0
 public IEnumerable <object> GetAutocompleteStrings(RecordEntryViewModelBase entryViewModel)
 {
     return(GetAutocompleteStringsFunction(entryViewModel));
 }