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();
        }
Пример #2
0
        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();
        }
Пример #3
0
 public SaleViewModel(IDataserviceProvider datastoreProvider)
 {
     Dataservice = datastoreProvider.GetDataservice <ISaleDataservice>();
 }