// private ICompanyInformationsService companyInformationsService; public GLListView() { isolateStorageProvider = new IsolatedStorageProvider(); _gLsService = SmObjectFactory.Container.GetInstance <IGLsService>(); // companyInformationsService = SmObjectFactory.Container.GetInstance<ICompanyInformationsService>(); InitializeComponent(); Loaded += (s, ea) => { _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); _viewModel = DataContext as GLListViewModel; _viewModel.Failed += OnFailed; _viewModel.Error += OnError; _viewModel.LoadGLs(); GLDataForm.CommandProvider = new CustomCommandProvider(); // //GLDataForm.AddNewItem(); GLRadGridView.SelectedItem = null; detailRadTabItem.IsSelected = true; // isolateStorageProvider.LoadFromStorage(); }; Unloaded += (s, ea) => { _viewModel.Failed -= OnFailed; _viewModel.Error -= OnError; // isolateStorageProvider.SaveToStorage(); }; }
public AddEditTLViewModel(ITLsService tLsService, IGLsService gLsService, ISystemAccountingSettingsService systemAccountingSettingsService) { _tLsService = tLsService; _gLsService = gLsService; CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); GLsDropDownOpenedCommand = new RelayCommand(OnGLsDropDownOpened, () => GLs != null && GLs.Any()); _systemAccountingSettingsService = systemAccountingSettingsService; }
public AddGLTreeItemWindowViewModel(IGLsService gLsService, ISystemAccountingSettingsService systemAccountingSettingsService) { _systemAccountingSettingsService = systemAccountingSettingsService; _gLsService = gLsService; // CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); GL = new GL(); }
public AddEditGLViewModel(IGLsService gLsService, ISystemAccountingSettingsService systemAccountingSettingsService) { _systemAccountingSettingsService = systemAccountingSettingsService; _gLsService = gLsService; CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); SaveAddCommand = new RelayCommand(OnSaveAdd, CanSaveAdd); GL = new EditableGL(); }
public TreeAccountListView() { _systemAccountingSettingsService = SmObjectFactory.Container.GetInstance <ISystemAccountingSettingsService>(); _gLsService = SmObjectFactory.Container.GetInstance <IGLsService>(); InitializeComponent(); Loaded += (s, ea) => { _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>(); _vm = DataContext as TreeAccountListViewModel; _vm.Load(); }; }
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>(); }