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);
 }
Exemplo n.º 2
0
 public AddEditFinancialYearViewModel(IFinancialYearsService financialYearsService, IAppContextService appContextService)
 {
     _financialYearsService = financialYearsService;
     _appContextService     = appContextService;
     CancelCommand          = new RelayCommand(OnCancel);
     SaveCommand            = new RelayCommand(OnSave, CanSave);
 }
 public SelectFinancialYearListViewModel(ISelectFinancialYearsService selectFinancialYearsService, IAppContextService appContextService)
 {
     _selectFinancialYearsService = selectFinancialYearsService;
     _appContextService           = appContextService;
     SaveCommand = new RelayCommand(OnSave, CanSave);
     FinancialYearsDropDownOpenedCommand = new RelayCommand(OnFinancialYearsDropDownOpened);
 }
        public ReviewAccountListViewModel(IReviewAccountsService reviewAccountsService,
                                          ISelectFinancialYearsService selectFinancialYearsService, IAppContextService appContextService, ICompanyInformationsService companyInformationsService)
        {
            _companyInformationsService = companyInformationsService;
            CompanyInformationModel     = _companyInformationsService.GetCompanyInformationModel();
            _reviewAccountsService      = reviewAccountsService;
            _appContextService          = appContextService;
            AccDocumentHeaderFilter     = new AccDocumentHeaderFilter
            {
            };
            _selectFinancialYearsService = selectFinancialYearsService;

            GLGroupedCommand  = new RelayCommand(OnGLGrouped);
            TLGroupedCommand  = new RelayCommand(OnTLGrouped);
            SLGroupedCommand  = new RelayCommand(OnSLGrouped);
            DL1GroupedCommand = new RelayCommand(OnDL1Grouped);
            DL2GroupedCommand = new RelayCommand(OnDL2Grouped);
            FromYearsDropDownOpenedCommand = new RelayCommand(OnFromYearsDropDownOpened);
            ToYearsDropDownOpenedCommand   = new RelayCommand(OnToYearsDropDownOpened);

            CurrencyGroupedCommand = new RelayCommand(OnCurrencyGrouped);
            TrackingGroupedCommand = new RelayCommand(OnTrackingGrouped);

            GLDetailedCommand       = new RelayCommand <string>(OnGLDetailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedGL)); });
            TLDetailedCommand       = new RelayCommand <string>(OnTLDetailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedTL)); });
            SLDetailedCommand       = new RelayCommand <string>(OnSLDetailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedSL)); });
            DL1DetailedCommand      = new RelayCommand <string>(OnDL1Detailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedDL1)); });
            DL2DetailedCommand      = new RelayCommand <string>(OnDL2Detailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedDL2)); });
            CurrencyDetailedCommand = new RelayCommand <string>(OnCurrencySLDetailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedCurrency)); });
            TrackingDetailedCommand = new RelayCommand <string>(OnTrackingDetailed, (s) => { return(GroupStatus.HasFlag(GroupStatusEnum.DetailedTracking)); });
            UndoCommand             = new RelayCommand(Undo, () => { return(GroupStatus.HasFlag(GroupStatusEnum.Undo)); });

            ApplyFilterCommand = new RelayCommand(OnApplyFilter, () => AccDocumentHeaderFilter != null);
            _accessUtility     = SmObjectFactory.Container.GetInstance <AccessUtility>();
        }
 public AccDocumentHeaderListViewModel(IAppContextService appContextService, ICompanyInformationsService companyInformationsService)
 {
     _companyInformationsService = companyInformationsService;
     CompanyInformationModel     = _companyInformationsService.GetCompanyInformationModel();
     _appContextService          = appContextService;
     _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>();
 }
        public AddEditAccDocumentHeaderViewModel(IAccDocumentHeadersService accDocumentHeadersService, IAppContextService appContextService, SainaDbContext uow)
        {
            _accDocumentHeadersService = accDocumentHeadersService;
            _appContextService         = appContextService;
            _uow = uow;

            DraftCommand = new RelayCommand(OnDraft, () =>
                                            AccDocumentHeader.Status != StatusEnum.Permanent && isModified);
            TemporaryCommand = new RelayCommand(OnTemporary,
                                                () => AccDocumentHeader?.HasErrors == false && AccDocumentItemListViewModel?.AccDocumentItem?.HasErrors == false &&
                                                AccDocumentHeader?.Difference == 0 &&
                                                AccDocumentHeader.Status != StatusEnum.End &&
                                                AccDocumentHeader.Status != StatusEnum.Permanent &&
                                                AccDocumentHeader.Status != StatusEnum.Temporary &&
                                                (isModified || AccDocumentHeader.Status == StatusEnum.Temporary));
            EndCommand = new RelayCommand(OnEnd,
                                          () => AccDocumentHeader?.HasErrors == false && AccDocumentItemListViewModel?.AccDocumentItem?.HasErrors == false &&
                                          AccDocumentHeader?.Difference == 0 &&
                                          AccDocumentHeader.Status == StatusEnum.Temporary
                                          );
            BackFromEndCommand = new RelayCommand(OnBackFromEnd,
                                                  () => AccDocumentHeader.Status == StatusEnum.End
                                                  );
            PermanentCommand = new RelayCommand(OnPermanent,
                                                () => AccDocumentHeader.Status == StatusEnum.End &&
                                                AccDocumentHeader?.HasErrors == false && AccDocumentItemListViewModel?.AccDocumentItem?.HasErrors == false &&
                                                AccDocumentHeader?.Difference == 0
                                                );
            CancelCommand = new RelayCommand(OnCancel);

            AccDocumentItemListViewModel       = SmObjectFactory.Container.GetInstance <AccDocumentItemListViewModel>();
            TypeDocumentsDropDownOpenedCommand = new RelayCommand(OnTypeDocumentsDropDownOpened);
        }
 public CompanyInformationViewModel(IAppContextService appContextService, ICompanyInformationsService companyInformationsService)
 {
     _appContextService          = appContextService;
     _companyInformationsService = companyInformationsService;
     CompanyInformationModel     = _companyInformationsService.GetCompanyInformationModel();
     SaveCommand    = new RelayCommand(onSave);
     _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>();
 }
 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 GeneralSystemSettingViewModel(IAppContextService appContextService, IGeneralSystemSettingsService generalSystemSettingsService, ISLsService sLsService)
 {
     _sLsService                   = sLsService;
     _appContextService            = appContextService;
     _generalSystemSettingsService = generalSystemSettingsService;
     GeneralSystemSettingModel     = _generalSystemSettingsService.GetGeneralSystemSettingModel();
     SLsDropDownOpenedCommand      = new RelayCommand(OnSLsDropDownOpened);
     SaveCommand                   = new RelayCommand(onSave);
 }
Exemplo n.º 10
0
        public OpeningClosingDocHeaderListViewModel(IAccDocumentHeadersService accDocumentHeadersService, IAppContextService appContextService, IOpeningClosingsService openingClosingsService)
        {
            _accDocumentHeadersService = accDocumentHeadersService;
            _appContextService         = appContextService;
            _openingClosingsService    = openingClosingsService;

            EditAccDocumentHeaderCommand = new RelayCommand <AccDocumentHeader>(OnEditAccDocumentHeader);
            ReturnCommand = new RelayCommand(OnReturnd);
            DeleteCommand = new RelayCommand <AccDocumentHeader>(OnDeleteAccDocumentHeader);
        }
        public TLDocumentItemListViewModel(IAppContextService appContextService, ITLDocumentsService tLDocumentsService, ICompanyInformationsService companyInformationsService)
        {
            _companyInformationsService = companyInformationsService;
            CompanyInformationModel     = _companyInformationsService.GetCompanyInformationModel();
            _tLDocumentsService         = tLDocumentsService;

            _appContextService = appContextService;
            CancelCommand      = new RelayCommand(OnCancel);
            //  SaveCommand = new RelayCommand(OnSave, CanSave);
        }
 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 SystemSettingRetailViewModel(IAppContextService appContextService, ISystemSettingRetailsService systemSettingRetailsService, IBankAccountsService bankAccountsService, IStocksService stocksService)
        {
            _bankAccountsService         = bankAccountsService;
            _stocksService               = stocksService;
            _appContextService           = appContextService;
            _systemSettingRetailsService = systemSettingRetailsService;
            SystemSettingRetailModel     = _systemSettingRetailsService.GetSystemSettingRetailModel();

            SaveCommand = new RelayCommand(onSave);
        }
Exemplo n.º 14
0
        /// <summary>
        /// ویوو مدل صفحه لاگین برنامه
        /// </summary>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="configSetGet">دسترسی به اطلاعات فایل کانفیگ برنامه</param>
        public LoginPageViewModel(IAppContextService appContextService, IConfigSetGet configSetGet)
        {
            _appContextService = appContextService;
            _configSetGet = configSetGet;

            LoginPageData = new LoginPageModel();
            DoLogin = new RelayCommand(doLogin, canDoLogin);

            initUserFromConfig();
        }
Exemplo n.º 15
0
        /// <summary>
        /// ویوو مدل صفحه لاگین برنامه
        /// </summary>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="configSetGet">دسترسی به اطلاعات فایل کانفیگ برنامه</param>
        public LoginPageViewModel(IAppContextService appContextService, IConfigSetGet configSetGet)
        {
            _appContextService = appContextService;
            _configSetGet      = configSetGet;

            LoginPageData = new LoginPageModel();
            DoLogin       = new RelayCommand(doLogin, canDoLogin);

            initUserFromConfig();
        }
Exemplo n.º 16
0
 public EditCurrencyExchangeRateDocHeaderViewModel(IAccDocumentHeadersService accDocumentHeadersService, IAppContextService appContextService, Saina.Data.Context.SainaDbContext uow)
 {
     _accDocumentHeadersService = accDocumentHeadersService;
     _appContextService         = appContextService;
     _uow          = uow;
     CancelCommand = new RelayCommand(OnCancel);
     //  SaveCommand = new RelayCommand(OnSave, CanSave);
     ChangeStatusCommand                = new RelayCommand <StatusEnum>(OnStatusChanged);
     AccDocumentItemListViewModel       = SmObjectFactory.Container.GetInstance <AccDocumentItemListViewModel>();
     TypeDocumentsDropDownOpenedCommand = new RelayCommand(OnTypeDocumentsDropDownOpened);
 }
        public AttachmentListWindow()
        {
            _viewModel         = DataContext as AccDocumentHeaderListViewModel;
            _appContextService = SmObjectFactory.Container.GetInstance <IAppContextService>();

            InitializeComponent();
            Loaded += (s, e) =>
            {
                var addNewCommand = RadDataFormCommands.AddNew as RoutedUICommand;
                addNewCommand.Execute(null, attachmentDataForm);
            };
        }
Exemplo n.º 18
0
 /// <summary>
 /// سازنده کلاس
 /// </summary>
 /// <param name="uow">وهله‌ای از الگوی واحد کار یا زمینه ایی اف</param>
 public AccDocumentHeadersService(SainaDbContext uow, IAppContextService appContextService)
 {
     _uow = uow;
     _appContextService = appContextService;
     // var header = new AccDocumentHeader {AccDocumentHeaderId=36, HeaderDescription = "My Header Description!!" };
     //var h= _uow.AccDocumentHeaders.Find(36);
     // _uow.Entry(h).CurrentValues.SetValues(header);
     // _uow.SaveChanges();
     //var h=uow.AccDocumentHeaders.Find(36);
     //uow.Entry(h).Collection(x => x.AccDocumentItems).Load();
     //h.AccDocumentItems.Add( new AccDocumentItem {Description1="MyTest" });
 }
Exemplo n.º 19
0
        /// <summary>
        /// ویوو مدل تغییر اطلاعات کاربر جاری وارد شده به سیستم
        /// </summary>
        /// <param name="uow">وهله‌ای از زمینه و واحد کاری ایی اف</param>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="usersService">سرویس اطلاعات کاربران</param>
        public ChangeProfileViewModel(IUnitOfWork uow, IAppContextService appContextService, IUsersService usersService)
        {
            _uow = uow;
            _usersService = usersService;
            _appContextService = appContextService;

            ChangeProfileData = new LoginPageModel();
            DoSave = new RelayCommand(doSave, canDoSave);

            ChangeProfileData.UserName = _appContextService.CurrentUser.UserName;
            ChangeProfileData.Password = _appContextService.CurrentUser.Password;
        }
Exemplo n.º 20
0
 public AddEditDocumentNumberingViewModel(IDocumentNumberingsService documentNumberingsService, IAppContextService appContextService, IAccDocumentHeadersService accDocumentHeadersService, IAccountDocumentsService accountDocumentsService, IStylesService stylesService, ICountingWaysService countingWaysService)
 {
     _documentNumberingsService = documentNumberingsService;
     _accDocumentHeadersService = accDocumentHeadersService;
     _appContextService         = appContextService;
     _accountDocumentsService   = accountDocumentsService;
     _stylesService             = stylesService;
     _countingWaysService       = countingWaysService;
     CancelCommand = new RelayCommand(OnCancel);
     SaveCommand   = new RelayCommand(OnSave, CanSave);
     AccountDocumentsDropDownOpenedCommand = new RelayCommand(OnAccountDocumentsDropDownOpened, () => AccountDocuments != null && AccountDocuments.Any());
 }
Exemplo n.º 21
0
        /// <summary>
        /// ویوو مدل تغییر اطلاعات کاربر جاری وارد شده به سیستم
        /// </summary>
        /// <param name="uow">وهله‌ای از زمینه و واحد کاری ایی اف</param>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="usersService">سرویس اطلاعات کاربران</param>
        public ChangeProfileViewModel(IUnitOfWork uow, IAppContextService appContextService, IUsersService usersService)
        {
            _uow               = uow;
            _usersService      = usersService;
            _appContextService = appContextService;

            ChangeProfileData = new LoginPageModel();
            DoSave            = new RelayCommand(doSave, canDoSave);

            ChangeProfileData.UserName = _appContextService.CurrentUser.UserName;
            ChangeProfileData.Password = _appContextService.CurrentUser.Password;
        }
Exemplo n.º 22
0
 public OpeningClosingListViewModel(IOpeningClosingsService openingClosingsService, ITLDocumentsService tLDocumentsService, IAppContextService appContextService, IAccDocumentItemsService accDocumentItemsService, ICurrencyExchangesService currencyExchangesService, IAccDocumentHeadersService accDocumentHeadersService)
 {
     _tLDocumentsService        = tLDocumentsService;
     _accDocumentItemsService   = accDocumentItemsService;
     _accDocumentHeadersService = accDocumentHeadersService;
     _currencyExchangesService  = currencyExchangesService;
     _openingClosingsService    = openingClosingsService;
     _appContextService         = appContextService;
     AddAccDocumentCommand      = new RelayCommand(OnAddAccDocument);
     DocumentDate = DateTime.Now;
     ViewSystemDocumentHeaderCommand = new RelayCommand(OnViewSystemDocumentHeader);
     _accessUtility = SmObjectFactory.Container.GetInstance <AccessUtility>();
 }
Exemplo n.º 23
0
        /// <summary>
        /// ویوو مدل افزودن و مدیریت کاربران
        /// </summary>
        /// <param name="uow">وهله‌ای از زمینه و واحد کاری ایی اف</param>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="usersService">سرویس اطلاعات کاربران</param>
        public AddNewUserViewModel(IUnitOfWork uow,
                                   IAppContextService appContextService,
                                   IUsersService usersService)
        {
            _uow = uow;
            _appContextService = appContextService;
            _usersService = usersService;

            UsersList = _usersService.GetSyncedUsersList();

            DoSave = new RelayCommand(doSave, canDoSave);
            DoAddNew = new RelayCommand(doAddNew);
        }
        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;
        }
Exemplo n.º 25
0
 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>();
 }
Exemplo n.º 26
0
        /// <summary>
        /// ویوو مدل افزودن و مدیریت کاربران
        /// </summary>
        /// <param name="uow">وهله‌ای از زمینه و واحد کاری ایی اف</param>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="usersService">سرویس اطلاعات کاربران</param>
        public AddNewUserViewModel(IUnitOfWork uow,
                                   IAppContextService appContextService,
                                   IUsersService usersService)
        {
            _uow = uow;
            _appContextService = appContextService;
            _usersService      = usersService;

            UsersList = _usersService.GetSyncedUsersList();

            DoSave   = new RelayCommand(doSave, canDoSave);
            DoAddNew = new RelayCommand(doAddNew);
        }
        /// <summary>
        /// ویوو مدل صفحه لاگین برنامه
        /// </summary>
        /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
        /// <param name="configSetGet">دسترسی به اطلاعات فایل کانفیگ برنامه</param>
        public LoginPageViewModel()
        {
            _appContextService = SmObjectFactory.Container.GetInstance <IAppContextService>();
            _configSetGet      = SmObjectFactory.Container.GetInstance <IConfigSetGet>();

            LoginPageData = new LoginPageModel {
                UserName = _configSetGet.GetConfigData("LastLoginName"), Password = _configSetGet.GetConfigData("Password"), RememberMe = _configSetGet.GetConfigData("RememberMe") == "true"
            };
            if (string.IsNullOrWhiteSpace(LoginPageData.Password))
            {
            }
            DoLogin = new RelayCommand(doLogin, canDoLogin);
            DropDownOpenedCommand = new RelayCommand(onDropDownOpened);
            initUserFromConfig();
        }
        public DocumntsFlowView()
        {
            InitializeComponent();
            _appContextService = SmObjectFactory.Container.GetInstance <IAppContextService>();

            Loaded += (s, e) =>
            {
                _viewModel = DataContext as DocumntsFlowViewModel;
                accDocumentItemsGridView.SelectedItem = null;
                var sender = _viewModel.AccDocumentItemDTO;
                var state  = _viewModel.State;
                accDocumentItemsGridView.IsBusy = true;
                _viewModel.Loaded();
                accDocumentItemsGridView.IsBusy = false;
            };
        }
Exemplo n.º 29
0
 public ConvertDocumentListViewModel(IConvertDocumentsService convertDocumentsService,
                                     IOpeningClosingsService openingClosingsService, IAppContextService appContextService, ISystemAccountingSettingsService systemAccountingSettingsService, IAccDocumentHeadersService accDocumentHeadersService, ICompanyInformationsService companyInformationsService)
 {
     _companyInformationsService      = companyInformationsService;
     CompanyInformationModel          = _companyInformationsService.GetCompanyInformationModel();
     _systemAccountingSettingsService = systemAccountingSettingsService;
     AccountingSetting          = _systemAccountingSettingsService.GetSystemAccountingSettingModel();
     _accDocumentHeadersService = accDocumentHeadersService;
     _openingClosingsService    = openingClosingsService;
     _convertDocumentsService   = convertDocumentsService;
     _appContextService         = appContextService;
     PermanentConvertCommand    = new RelayCommand(OnPermanentConvertDocument);
     TemporaryConvertCommand    = new RelayCommand(OnTemporaryConvertDocument);
     _accessUtility             = SmObjectFactory.Container.GetInstance <AccessUtility>();
     // AddAccDocumentItemCommand = new RelayCommand<AccDocumentItem>(OnAddAccDocumentItem);
 }
 public TLDocumentHeaderListViewModel(ITLDocumentsService tLDocumentsService,
                                      IAccDocumentItemsService accDocumentItemsService, IOpeningClosingsService openingClosingsService,
                                      IAppContextService appContextService, ICurrencyExchangesService currencyExchangesService, ICompanyInformationsService companyInformationsService)
 {
     _companyInformationsService = companyInformationsService;
     CompanyInformationModel     = _companyInformationsService.GetCompanyInformationModel();
     _tLDocumentsService         = tLDocumentsService;
     _openingClosingsService     = openingClosingsService;
     _appContextService          = appContextService;
     _accDocumentItemsService    = accDocumentItemsService;
     _currencyExchangesService   = currencyExchangesService;
     CancelCommand = new RelayCommand(OnCancel);
     //   SaveCommand = new RelayCommand(OnSave, CanSave);
     ViewCommand           = new RelayCommand <TLDocumentHeader>(OnView);
     ExportDocumentCommand = new RelayCommand(OnExportDocument, CanExportDocument);
     DeleteCommand         = new RelayCommand <TLDocumentHeader>(OnDeleteTLDocumentHeader);
     _accessUtility        = SmObjectFactory.Container.GetInstance <AccessUtility>();
 }
Exemplo n.º 31
0
        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>();
        }
 /// <summary>
 /// سازنده کلاس
 /// </summary>
 /// <param name="uow">وهله‌ای از الگوی واحد کار یا زمینه ایی اف</param>
 public BankTypesService(SainaDbContext uow, IAppContextService appContextService)
 {
     _uow = uow;
     _appContextService = appContextService;
     //_accountGroups = _uow.Set<AccountGroup>();
 }
 /// <summary>
 /// سازنده کلاس
 /// </summary>
 /// <param name="uow">وهله‌ای از الگوی واحد کار یا زمینه ایی اف</param>
 public AccountDocumentsService(SainaDbContext uow, IAppContextService appContextService)
 {
     _uow = uow;
     _appContextService = appContextService;
 }
Exemplo n.º 34
0
 /// <summary>
 /// سیستم راهبری برنامه در اینجا مدیریت می‌شود
 /// </summary>
 /// <param name="appContextService">اطلاعات سراسری برنامه در مورد کاربر جاری را فراهم می‌کند</param>
 public MainMenuViewModel(IAppContextService appContextService)
 {
     _appContextService = appContextService;
     DoNavigate = new RelayCommand<string>(doNavigate);
 }