public CloseProfitLossAccountListViewModel(ICloseProfitLossAccountsService closeProfitLossAccountsService, ITLDocumentsService tLDocumentsService, IOpeningClosingsService openingClosingsService, IAccDocumentItemsService accDocumentItemsService, ICurrencyExchangesService currencyExchangesService, IAccDocumentHeadersService accDocumentHeadersService, IAppContextService appContextService, ISLsService sLsService, ICompanyInformationsService companyInformationsService) { _tLDocumentsService = tLDocumentsService; _companyInformationsService = companyInformationsService; CompanyInformationModel = _companyInformationsService.GetCompanyInformationModel(); _accDocumentHeadersService = accDocumentHeadersService; _openingClosingsService = openingClosingsService; _accDocumentItemsService = accDocumentItemsService; _currencyExchangesService = currencyExchangesService; _closeProfitLossAccountsService = closeProfitLossAccountsService; _sLsService = sLsService; _appContextService = appContextService; AccDocumentItemListViewModel = SmObjectFactory.Container.GetInstance <AccDocumentItemListViewModel>(); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened, () => SLs != null && SLs.Any()); DLs1DropDownOpenedCommand = new RelayCommand <string>(OnDLs1DropDownOpened); DLs2DropDownOpenedCommand = new RelayCommand <string>(OnDLs2DropDownOpened); //TransferCommand = new RelayCommand<ObservableCollection<object>>(OnTransfer, (o) => AccDocumentItems.Count > 0); //AllTransferCommand = new RelayCommand<ObservableCollection<object>>(OnAllTransfer, (o) => AccDocumentItems.Count > 0); //AllReturnCommand = new RelayCommand<ObservableCollection<object>>(OnAllReturn, (o) => AccDocumentItems1.Count > 0); //ReturnCommand = new RelayCommand<ObservableCollection<object>>(OnReturn, (o) => AccDocumentItems1.Count > 0); TransferCommand = new RelayCommand <ObservableCollection <object> >(OnTransfer); AllTransferCommand = new RelayCommand <ObservableCollection <object> >(OnAllTransfer); AllReturnCommand = new RelayCommand <ObservableCollection <object> >(OnAllReturn); ReturnCommand = new RelayCommand <ObservableCollection <object> >(OnReturn); ExportCommand = new RelayCommand(OnExport, () => !Close); ViewSystemDocumentHeaderCommand = new RelayCommand(OnViewSystemDocumentHeader); _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); // Close = true; // TypeDocumentsDropDownOpenedCommand = new RelayCommand(OnTypeDocumentsDropDownOpened); }
public GeneralSystemSettingViewModel(IAppContextService appContextService, IGeneralSystemSettingsService generalSystemSettingsService, ISLsService sLsService) { _sLsService = sLsService; _appContextService = appContextService; _generalSystemSettingsService = generalSystemSettingsService; GeneralSystemSettingModel = _generalSystemSettingsService.GetGeneralSystemSettingModel(); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened); SaveCommand = new RelayCommand(onSave); }
public StockListViewModel(IStocksService stocksService, ISLsService sLsService, IProductsService productsService) { _sLsService = sLsService; _productsService = productsService; _stocksService = stocksService; AddStockCommand = new RelayCommand(OnAddStock); EditStockCommand = new RelayCommand <Stock>(OnEditStock); DeleteCommand = new RelayCommand <Stock>(OnDeleteStock); }
public SystemSettingSaleViewModel(IAppContextService appContextService, ISystemSettingSalesService systemSettingSalesService, ISLsService sLsService) { _sLsService = sLsService; _appContextService = appContextService; _systemSettingSalesService = systemSettingSalesService; SystemSettingSaleModel = _systemSettingSalesService.GetSystemSettingSaleModel(); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened); SaveCommand = new RelayCommand(onSave); }
public SalarySystemSettingViewModel(IAppContextService appContextService, ISalarySystemSettingsService salarySystemSettingsService, ISLsService sLsService, ISelectAgentsService selectAgentsService) { _selectAgentsService = selectAgentsService; _sLsService = sLsService; _appContextService = appContextService; _salarySystemSettingsService = salarySystemSettingsService; SalarySystemSettingModel = _salarySystemSettingsService.GetSalarySystemSettingModel(); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened); SaveCommand = new RelayCommand(onSave); }
public AddEditDLViewModel(IDLsService dLsService, ISLsService sLsService, IDLTypesService dLTypesService, IDLAccountsNaturesService dLAccountsNatureService, ISystemAccountingSettingsService systemAccountingSettingsService) { _systemAccountingSettingsService = systemAccountingSettingsService; _dLsService = dLsService; _sLsService = sLsService; _dLTypesService = dLTypesService; _dLAccountsNatureService = dLAccountsNatureService; CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); SelectedDLTypes = new ObservableCollection <DLType>(); SelectedDLAccountsNatures = new ObservableCollection <DLAccountsNature>(); }
public SystemAccountingSettingViewModel(IAppContextService appContextService, IGLsService gLsService, ITLsService tLsService, ISLsService sLsService, IDLsService dLsService, ISystemAccountingSettingsService systemAccountingSettingsService) { _gLsService = gLsService; _tLsService = tLsService; _sLsService = sLsService; _dLsService = dLsService; _appContextService = appContextService; _systemAccountingSettingsService = systemAccountingSettingsService; SystemAccountingSettingModel = AutoMapper.Mapper.Map <SystemAccountingSettingModel, EditableSystemAccountingSettingModel>(_systemAccountingSettingsService.GetSystemAccountingSettingModel()); SystemAccountingSettingModel.ValidationDelegate += SystemAccountingSettingModel_ValidationDelegate; SaveCommand = new RelayCommand(onSave); _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); }
public ShoppingSystemSettingViewModel(IAppContextService appContextService, IShoppingSystemSettingsService shoppingSystemSettingsService, ISLsService sLsService) { _sLsService = sLsService; _appContextService = appContextService; _shoppingSystemSettingsService = shoppingSystemSettingsService; // ShoppingSystemSettingModel = _shoppingSystemSettingsService.GetShoppingSystemSettingModel(); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened); SaveCommand = new RelayCommand(onSave); ShoppingSystemSettingModel = AutoMapper.Mapper.Map <ShoppingSystemSettingModel, EditableShoppingSystemSettingViewModel>(_shoppingSystemSettingsService.GetShoppingSystemSettingModel()); ShoppingSystemSettingModel.ValidationDelegate += ShoppingSystemSettingModel_ValidationDelegate; }
public AddEditStockViewModel(IStocksService stocksService, IProductsService productsService, IUsersService usersService, ISLsService sLsService) { _stocksService = stocksService; _productsService = productsService; _sLsService = sLsService; _usersService = usersService; CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); ProductsDropDownOpenedCommand = new RelayCommand(OnProductsDropDownOpened, () => Products != null && Products.Any()); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened, () => SLs != null && SLs.Any()); DLs1DropDownOpenedCommand = new RelayCommand <string>(OnDLs1DropDownOpened); DLs2DropDownOpenedCommand = new RelayCommand <string>(OnDLs2DropDownOpened); UsersDropDownOpenedCommand = new RelayCommand(OnUsersDropDownOpened, () => Users != null && Users.Any()); }
public AddSLTreeItemWindowViewModel(ISLsService sLsService, ITLsService tLsService, IDLTypesService dLTypesService, ISystemAccountingSettingsService systemAccountingSettingsService, IPropertiesService propertiesService, IAccountsNaturesService accountsNaturesService) { _dLTypesService = dLTypesService; _sLsService = sLsService; _tLsService = tLsService; _systemAccountingSettingsService = systemAccountingSettingsService; _propertiesService = propertiesService; _accountsNaturesService = accountsNaturesService; // CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); TLsDropDownOpenedCommand = new RelayCommand(OnTLsDropDownOpened, () => TLs != null && TLs.Any()); PropertiesDropDownOpenedCommand = new RelayCommand(OnPropertiesDropDownOpened, () => Properties != null && Properties.Any()); AccountsNaturesDropDownOpenedCommand = new RelayCommand(OnAccountsNaturesDropDownOpened, () => AccountsNatures != null && AccountsNatures.Any()); SelectedDLTypes1 = new ObservableCollection <DLType>(); SelectedDLTypes2 = new ObservableCollection <DLType>(); // SLStandardDescriptionListViewModel = SmObjectFactory.Container.GetInstance<SLStandardDescriptionListViewModel>(); SL = new SL(); }
public AccDocumentItemListViewModel(IAccDocumentItemsService accDocumentItemsService, ISLsService sLsService, IExchangeRatesService exchangeRatesService, ICurrenciesService currenciesService, ISLStandardDescriptionsService sLStandardDescriptionsService) { _accDocumentItemsService = accDocumentItemsService; _sLsService = sLsService; _exchangeRatesService = exchangeRatesService; _currenciesService = currenciesService; _sLStandardDescriptionsService = sLStandardDescriptionsService; //EditAccDocumentItemCommand = new RelayCommand<AccDocumentItem>(OnEditAccDocumentItem); DeleteCommand = new RelayCommand <EditableAccDocumentItem>(OnDeleteAccDocumentItem); // CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened); DLsDropDownOpenedCommand = new RelayCommand <string>(OnDLsDropDownOpened); SLStandardDescriptionsDropDownOpenedCommand = new RelayCommand <string>(OnSLStandardDescriptionsDropDownOpened); CurrenciesDropDownOpenedCommand = new RelayCommand <string>(OnCurrenciesDropDownOpened); ExchangeRatesDropDownOpenedCommand = new RelayCommand <string>(OnExchangeRatesDropDownOpened); CanAdd = true; _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); }
public OpeningClosingDocItemListViewModel(IAccDocumentItemsService accDocumentItemsService, ISLsService sLsService, IExchangeRatesService exchangeRatesService, ICurrenciesService currenciesService, ISLStandardDescriptionsService sLStandardDescriptionsService) { _accDocumentItemsService = accDocumentItemsService; _sLsService = sLsService; _exchangeRatesService = exchangeRatesService; _currenciesService = currenciesService; _sLStandardDescriptionsService = sLStandardDescriptionsService; //EditAccDocumentItemCommand = new RelayCommand<AccDocumentItem>(OnEditAccDocumentItem); DeleteCommand = new RelayCommand <EditableAccDocumentItem>(OnDeleteAccDocumentItem); // CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); CancelCommand = new RelayCommand(OnCancel); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened); DLsDropDownOpenedCommand = new RelayCommand <string>(OnDLsDropDownOpened); SLStandardDescriptionsDropDownOpenedCommand = new RelayCommand <string>(OnSLStandardDescriptionsDropDownOpened); CurrenciesDropDownOpenedCommand = new RelayCommand <string>(OnCurrenciesDropDownOpened); ExchangeRatesDropDownOpenedCommand = new RelayCommand <string>(OnExchangeRatesDropDownOpened); CanAdd = true; AccDocumentHeader = new EditableAccDocumentHeader(); }
public CurrencyExchangeListViewModel(ICurrencyExchangesService currencyExchangesService, ITLDocumentsService tLDocumentsService, IOpeningClosingsService openingClosingsService, IAccDocumentItemsService accDocumentItemsService, IAccDocumentHeadersService accDocumentHeadersService, IAppContextService appContextService, ISLsService sLsService, ICompanyInformationsService companyInformationsService) { _tLDocumentsService = tLDocumentsService; _companyInformationsService = companyInformationsService; CompanyInformationModel = _companyInformationsService.GetCompanyInformationModel(); _accDocumentHeadersService = accDocumentHeadersService; _openingClosingsService = openingClosingsService; _currencyExchangesService = currencyExchangesService; _accDocumentItemsService = accDocumentItemsService; _sLsService = sLsService; _appContextService = appContextService; AccDocumentItemListViewModel = SmObjectFactory.Container.GetInstance <AccDocumentItemListViewModel>(); SLsDropDownOpenedCommand = new RelayCommand(OnSLsDropDownOpened, () => SLs != null && SLs.Any()); DLs1DropDownOpenedCommand = new RelayCommand <string>(OnDLs1DropDownOpened); DLs2DropDownOpenedCommand = new RelayCommand <string>(OnDLs2DropDownOpened); ViewCommand = new RelayCommand(OnView, CanView); ExportCommand = new RelayCommand(OnExport, CanExport); ViewSystemDocumentHeaderCommand = new RelayCommand(OnViewSystemDocumentHeader); _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); }
// private IsolatedStorageProvider isolatedStorageProvider; public SLListView() { // isolatedStorageProvider = new IsolatedStorageProvider(); _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); _sLsService = SmObjectFactory.Container.GetInstance <ISLsService>(); InitializeComponent(); // isolatedStorageProvider = new IsolatedStorageProvider(); Loaded += (s, ea) => { _viewModel = DataContext as SLListViewModel; // _viewModel.Failed += OnFailed; _viewModel.Error += OnError; _viewModel.LoadSLs(); SLDataForm.CommandProvider = new CustomCommandProvider(); RaiseCanExecuteChanged(); // NavStateFalse(); //var addNewSLCommand = RadDataFormCommands.AddNew as RoutedUICommand; //addNewSLCommand.Execute(null, SLDataForm); SLRadGridView.SelectedItem = null; detailRadTabItem.IsSelected = true; // DataContext = _viewModel; // isolatedStorageProvider.LoadFromStorage(); }; Unloaded += (s, ea) => { // _viewModel.UnLoaded(); // _viewModel.Failed -= OnFailed; _viewModel.Error -= OnError; // isolatedStorageProvider.SaveToStorage(); }; }