Exemple #1
0
        private void GetAccountList()
        {
            IAccountService        account_service = service_factory.CreateClient <IAccountService>();
            ICurrentCompanyService company_service = Unity.Container.Resolve <ICurrentCompanyService>();

            using (account_service)
            {
                var accounts = account_service.GetAccountsByCompany(company_service.CurrentCompany);
                AccountList = new ObservableCollection <Account>(accounts);
            }
        }
Exemple #2
0
        private void Initialize()
        {
            IProductService        product_service = _service_factor.CreateClient <IProductService>();
            ICurrentCompanyService curr_co         = Unity.Container.Resolve <ICurrentCompanyService>();

            using (product_service)
            {
                try
                {
                    var prod_list = product_service.GetProducts(curr_co.CurrentCompany);
                    ProductList = new List <Product>(prod_list.OrderBy(p => p.ProductType).ThenBy(p => p.ProductName).ToList());
                }
                catch
                {
                    ProductList = new List <Product>();
                }
            }
        }
        public CalendarBarViewModel(IEventAggregator event_aggtr, ICurrentCompanyService curr_company, IServiceFactory service_fctry)
        {
            event_aggregator = event_aggtr;
            current_company  = curr_company;
            service_factory  = service_fctry;

            event_aggregator.GetEvent <CalendarContextChangedEvent>().Subscribe(OnEventDaysChanged, ThreadOption.BackgroundThread);

            CurrentMonthDefaultDate = DateTime.Today;
            NextMonthDefaultDate    = CurrentMonthDefaultDate.AddMonths(1);
            ThirdMonthDefaultDate   = CurrentMonthDefaultDate.AddMonths(2);

            LoadStandardDeliveryDates();
            GetCompanyOpenOrders();
            GetCompanyOpenInvoices();
            LoadHolidayEvents();

            SelectedDays = _working_days;
        }
 public UserSettingsViewModel()
 {
     _company_service = ServiceLocator.Current.GetInstance <ICurrentCompanyService>();;
 }
 public RecentAccountsService(IEventAggregator event_aggtr, IServiceFactory service_fctry, ICurrentCompanyService company)
 {
     CurrentCompany   = company.CurrentCompany;
     event_aggregator = event_aggtr;
     service_factory  = service_fctry;
     Initialize();
 }
		public BrancheMessageService(Func<HttpSessionStateBase> lazySessionStateBase, ICurrentCompanyService currentCompany)
		{
			_lazySessionStateBase = ValidationUtil.CheckOnNullAndThrowIfNull(lazySessionStateBase);
			_currentCompany = ValidationUtil.CheckOnNullAndThrowIfNull(currentCompany);

			EmptyResult = string.Empty;
		}
Exemple #7
0
 public UserSettingsViewModel()
 {
     _company_service = Unity.Container.Resolve <ICurrentCompanyService>();;
 }