//==================================================================================================== public AddBookingViewModel(IMessageBoxService mboxService, IConfigService configService, IParentVm parent, Booking model) { _parent = parent; _mboxService = mboxService; _configService = configService; //Get Configuration AvailableDurations = _configService.GetAvailableDurations(); //Set Commands SubmitCommand = new ActionCommand(OnSubmit, _=>_isFormValid); CancelCommand = new ActionCommand(OnCancel); //Set up the screen for Add or Display. if (model.Id == -1) { Model = model; Caption = "Add New Booking"; IsAddMode = true; } else { Model = model; Caption = "Existing Booking"; IsAddMode = false; } }
public ChildViewModel(IParentVm parent) { _parent = parent; _testProperty = ""; ToggleSomething = new RelayCommand(InternalToggleSomething, InternalCanToggleSomething); }