public CruiseViewModel(ISaleDataservice saleDataservice, ISetupInfoDataservice setupInfo, CruiseValidator validator) : base(validator) { SaleDataservice = saleDataservice ?? throw new ArgumentNullException(nameof(saleDataservice)); SetupDataservice = setupInfo ?? throw new ArgumentNullException(nameof(setupInfo)); PurposeOptions = SetupDataservice.GetPurposes(); UOMOptions = SetupDataservice.GetUOMCodes(); }
public StratumTemplateListViewModel(ITemplateDataservice templateDataservice, ISaleDataservice saleDataservice, ISetupInfoDataservice setupDataservice, IDialogService dialogService) { TemplateDataservice = templateDataservice ?? throw new ArgumentNullException(nameof(templateDataservice)); DialogService = dialogService ?? throw new ArgumentNullException(nameof(dialogService)); SaleDataservice = saleDataservice ?? throw new ArgumentNullException(nameof(saleDataservice)); SetupDataservice = setupDataservice ?? throw new ArgumentNullException(nameof(setupDataservice)); TreeFieldOptions = TemplateDataservice.GetTreeFields(); Methods = SetupDataservice.GetCruiseMethods().Select(x => x.Method).ToArray(); }
public SaleViewModel(IDataserviceProvider datastoreProvider) { Dataservice = datastoreProvider.GetDataservice <ISaleDataservice>(); }