public StrengthViewModel(IEventAggregator eventAggregator, IComputeService computeService, IRegionService regionService, IAppPreferences appPreferences)
 {
     _eventAggregator = eventAggregator;
     _computeService = computeService;
     _regionService = regionService;
     _appPreferences = appPreferences;
 }
        public RegionController()
        {
            var dbfactory = new DatabaseFactory();
            var datacontext=dbfactory.Get();

            _regionService = new RegionService(new RegionRepository(dbfactory), new UnitOfWork(dbfactory));
        }
 public ShippingZoneService(DataContext db, ICountryService countryService, IRegionService regionService, IShippingMethodService shippingMethodService)
 {
     this.db = db;
     this.countryService = countryService;
     this.regionService = regionService;
     this.shippingMethodService = shippingMethodService;
 }
 public SelectionDateController(ITimeFrameService timeFrameService, IRegionService regionService, ISelectionDateService selectionDateService, ILumiaTrialFormDataService lumiaTrialFormDataService)
 {
     this.regionService = regionService;
     this.timeFrameService = timeFrameService;
     this.selectionDateService = selectionDateService;
     this.lumiaTrialFormDataService = lumiaTrialFormDataService;
 }
Example #5
0
 public TaxZoneService(DataContext db, ITaxRateService taxRateService, ICountryService countryService, IRegionService  regionService)
 {
     this.db = db;
     this.taxRateService = taxRateService;
     this.countryService = countryService;
     this.regionService = regionService;
 }
		public MainMenuViewModel()
		{
			Groups = new BindableCollection<MenuGroup>();

			if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
			{
				_running = IoC.Get<RunExperimentViewModel>();
				_runThresholdTest = IoC.Get<RunThresholdTestViewModel>();
				_permutations = IoC.Get<PermutationViewModel>();
				_nbsmConfig = IoC.Get<NBSmConfigViewModel>();

				_eventAggregator = IoC.Get<IEventAggregator>();
				_navService = IoC.Get<INavigationService>();
				_regionService = IoC.Get<IRegionService>();
				_subjectService = IoC.Get<ISubjectDataService>();
				_subjectFilterService = IoC.Get<ISubjectFilterService>();
				_computeService = IoC.Get<IComputeService>();

				var regionsVM = IoC.Get<RegionsViewModel>();

				Groups.Add(new MenuGroup { Title = "Source", Items = { regionsVM, IoC.Get<SubjectsViewModel>(), IoC.Get<GroupsViewModel>() } });
				Groups.Add(new MenuGroup { Title = "Config", Items = { _permutations, _nbsmConfig } });
				Groups.Add(new MenuGroup { Title = "Compute", Items = { _runThresholdTest, _running } });
				Groups.Add(new MenuGroup { Title = "Global", Items = { IoC.Get<GlobalStrengthViewModel>() } });
				Groups.Add(new MenuGroup { Title = "Component", Items = { IoC.Get<IntermodalViewModel>(), IoC.Get<IntraSummaryViewModel>()/*, new MenuItem { Title = "Associations" },*/ } });
				Groups.Add(new MenuGroup { Title = "Nodal", Items = { IoC.Get<NodalStrengthDataTypeViewModel>() } });
				Groups.Add(new MenuGroup { Title = "Edge", Items = { IoC.Get<EdgeSignificanceViewModel>() } });
			}
		}
Example #7
0
 public RecommendationApiController(
     ISpeciesService speciesService,
     IRegionService regionService,
     IProductionMethodService productionMethodService,
     IRecommendationService recommendationService)
     : base(speciesService, productionMethodService, regionService, recommendationService)
 {
 }
Example #8
0
 public AnalysisController(
     ISpeciesService speciesService,
     IRegionService regionService,
     IProductionMethodService productionMethodService,
     IRecommendationService recommendationService,
     IBodyOfWaterService bodyOfWaterService,
     ICriteria2Service criteriaService)
     : base(speciesService, productionMethodService, regionService, recommendationService, bodyOfWaterService, criteriaService)
 {
 }
Example #9
0
        public RegionBuilder(IRegionService regionService, IRiverBuilder riverBuilder, IList<IResourceBuilder> resourceBuilders, IRegionResolver regionResolver, IAggregateTileResolver tileResolver, ITileService tileService)
        {
            _regionService = regionService;
            _regionResolver = regionResolver;
            _tileResolver = tileResolver;
            _tileService = tileService;
            _riverBuilder = riverBuilder;

            _resourceBuilders = resourceBuilders;
        }
Example #10
0
 public ApiControllerBase(
     ISpeciesService speciesService,
     IProductionMethodService productionMethodService,
     IRegionService regionService,
     IRecommendationService recommendationService)
 {
     this.speciesService = speciesService;
     this.productionMethodService = productionMethodService;
     this.regionService = regionService;
     this.recommendationService = recommendationService;
 }
 public CompanyController(IEmailService emailService, IHandsetOpotunitiesService handsetOpotunitiesService, ITimeFrameService timeFrameService, IDeviceService deviceService, IRegionService regionService, ISelectionDateService selectionDateService, ILumiaTrialFormDataService lumiaTrialFormDataService)
 {
     this.deviceService = deviceService;
     this.regionService = regionService;
     this.selectionDateService = selectionDateService;
     this.lumiaTrialFormDataService = lumiaTrialFormDataService;
     this.timeFrameService = timeFrameService;
     this.handsetOpotunitiesService = handsetOpotunitiesService;
     this.emailService = emailService;
     this.companyViewModel = new CompanyViewModel();
 }
Example #12
0
		public MainViewModel(IAppPreferences appPreferences, IRegionService regionService, ISubjectService subjectService, IComputeService computeService, IEventAggregator eventAggregator)
		{
			_appPreferences = appPreferences;
			_regionService = regionService;
			_subjectService = subjectService;
			_computeService = computeService;
			_eventAggregator = eventAggregator;

			this.DisplayName = "REGIONS";

			Regions = new BindableCollection<RegionViewModel>();

			_eventAggregator.Subscribe(this);
		}
Example #13
0
        private ImportDataManager(string sourceFolder, string importedFolder, string importErrorsFolder, string logsFolder, ICountryService countryService, IRegionService regionService, IStoreService storeService, IEmployeeService employeeService)
        {
            _SourceFolder = sourceFolder;
            _ImportedFolder = importedFolder;
            _ImportErrorsFolder = importErrorsFolder;
            _LogsFolder = logsFolder;
            _CountryService = countryService;
            _RegionService = regionService;
            _StoreService = storeService;
            _EmployeeService = employeeService;

            _CIComparer = new CIComparer();
            _LogFileNames = GetImportLogFileNames();
            _ImportManager = CreateImportManager();
        }
Example #14
0
 /// <summary>
 /// 获取区域
 /// </summary>
 /// <param name="RegionService"></param>
 /// <param name="key">移除当前键,当为""或null不移除</param>
 /// <returns></returns>
 public static List<ChooseDictionary> ListAllRegionInfo(IRegionService RegionService, string key)
 {
     NameValueCollection nvc = new NameValueCollection();
     nvc.Add("isvalid", "1");
     NameValueCollection orderby = new NameValueCollection();
     orderby.Add("regionname", "asc");
     List<RegionInfo> datalist = RegionService.ListAllByCondition(nvc, orderby);
     if (!string.IsNullOrEmpty(key))
     {
         datalist.Remove(datalist.Where(x => x.Id.Equals(key)).SingleOrDefault());
     }
     var dicRegion = (from slist in datalist
                      select new ChooseDictionary { Text = slist.RegionName, Value = slist.Id, ParentId = slist.ParentId }).ToList();
     return dicRegion;
 }
Example #15
0
 public FrmImport(ImportParam importParam, ImportType importFormType)
 {
     InitializeComponent();
     _ImportFormType = importFormType;
     _BeenRunSuccessfully = false;
     _CountryService = importParam.CountryService;
     _RegionService = importParam.RegionService;
     _StoreService = importParam.StoreService;
     _EmployeeService = importParam.EmployeeService;
     _CanClose = true;
     _NeedFileDialog = isNeedFileDialog();
     if (!_NeedFileDialog)
         setBusinessVolumeParams(importParam, importFormType);
     LocalizeUI();
 }
Example #16
0
 public ControllerBase(
     ISpeciesService speciesService,
     IProductionMethodService productionMethodService,
     IRegionService regionService,
     IRecommendationService recommendationService,
     IBodyOfWaterService bodyOfWaterService,
     ICriteria2Service criteriaService)
     : this()
 {
     this.speciesService = speciesService;
     this.regionService = regionService;
     this.productionMethodService = productionMethodService;
     this.recommendationService = recommendationService;
     this.bodyOfWaterService = bodyOfWaterService;
     this.criteriaService = criteriaService;
 }
 public PublicationController(ICategoryService categoryService, ISubCategoryService subCategoryService,
                              IPublicationService publicationService, IImageService imageService,
                              IWorkPublicationDetailService workPublicationDetailService, ISubSubCategoryService subSubCategoryService,
                              IFavouritePublicationService favouritePublicationService, ICityService cityService,
                              IPublicationDetailsService publicationDetailsService, IUserService userService,
                              IChatService chatService, IRegionService regionService, IPublicationModelService publicationModelService)
 {
     this.categoryService              = categoryService;
     this.subCategoryService           = subCategoryService;
     this.publicationService           = publicationService;
     this.imageService                 = imageService;
     this.workPublicationDetailService = workPublicationDetailService;
     this.subSubCategoryService        = subSubCategoryService;
     this.favouritePublicationService  = favouritePublicationService;
     this.cityService = cityService;
     this.publicationDetailsService = publicationDetailsService;
     this.userService             = userService;
     this.chatService             = chatService;
     this.regionService           = regionService;
     this.publicationModelService = publicationModelService;
 }
Example #18
0
 public OrderController()
 {
     _iOrderService           = new OrderService();
     _iCartService            = new CartService();
     _iMemberService          = new MemberService();
     _iProductService         = new ProductService();
     _iPaymentConfigService   = new PaymentConfigService();
     _iCashDepositsService    = new CashDepositsService();
     _iShopService            = ServiceProvider.Instance <IShopService> .Create;
     _iLimitTimeBuyService    = new LimitTimeBuyService();
     _iCouponService          = new CouponService();
     _iShopBonusService       = new ShopBonusService();
     _iCollocationService     = new CollocationService();
     _iMemberCapitalService   = new MemberCapitalService();
     _iShippingAddressService = new ShippingAddressService();
     _iMemberIntegralService  = new MemberIntegralService();
     _iRegionService          = new RegionService();
     _iVShopService           = new VShopService();
     _iRefundService          = new RefundService();
     _iFightGroupService      = new FightGroupService();
 }
Example #19
0
        void runWithUserWriter(Cache cache)
        {
            //user "writer2" 's credential
            Properties <string, object> credentials = Properties <string, object> .Create <string, object>();

            //user = "******" has permission to do put ops only
            credentials.Insert("security-username", "writer2");
            credentials.Insert("security-password", "writer2");

            // Create user cache by passing credentials
            IRegionService userCache2 = cache.CreateAuthenticatedView(credentials);

            // Create region using usercache
            IRegion <string, string> userRegion2 = userCache2.GetRegion <string, string>("partition_region");

            bool exceptiongot = false;

            try
            {
                //"writer2" trying to do get operation on region, it should get NotAuthorized exception
                string res = userRegion2["key-1"];
            }
            catch (NotAuthorizedException ex)
            {
                Console.WriteLine("Got expected UnAuthorizedException: {0}", ex.Message);
                exceptiongot = true;
            }

            if (exceptiongot == false)
            {
                Console.WriteLine("Example FAILED: Did not get expected NotAuthorizedException");
            }
            else
            {
                Console.WriteLine("User writer2 got expected while doing get operation.");
            }

            //close the user cache
            userCache2.Close();
        }
 public BranchOrderController()
 {
     this._iOrderService           = (IOrderService) new OrderService();
     this._iCartService            = (ICartService) new CartService();
     this._iMemberService          = (IMemberService) new MemberService();
     this._iProductService         = (IProductService) new ProductService();
     this._iPaymentConfigService   = (IPaymentConfigService) new PaymentConfigService();
     this._iCashDepositsService    = (ICashDepositsService) new CashDepositsService();
     this._iSiteSettingService     = (ISiteSettingService) new SiteSettingService();
     this._iShopService            = (IShopService) new ShopService();
     this._iLimitTimeBuyService    = (ILimitTimeBuyService) new LimitTimeBuyService();
     this._iCouponService          = (ICouponService) new CouponService();
     this._iShopBonusService       = (IShopBonusService) new ShopBonusService();
     this._iCollocationService     = (ICollocationService) new CollocationService();
     this._iMemberCapitalService   = (IMemberCapitalService) new MemberCapitalService();
     this._iShippingAddressService = (IShippingAddressService) new ShippingAddressService();
     this._iMemberIntegralService  = (IMemberIntegralService) new MemberIntegralService();
     this._iRegionService          = (IRegionService) new RegionService();
     this._iVShopService           = (IVShopService) new VShopService();
     this._iRefundService          = (IRefundService) new RefundService();
     this._iFightGroupService      = (IFightGroupService) new FightGroupService();
 }
Example #21
0
        public CustomerController(ICustomerService customerService,
                                  ICityService cityService,
                                  IClassificationService classificationService,
                                  IGenderService genderService,
                                  IRegionService regionService,
                                  ISellerService sellerService,
                                  IFieldService fieldService,
                                  IMapper mapper)
        {
            _customerService       = customerService;
            _cityService           = cityService;
            _classificationService = classificationService;
            _genderService         = genderService;
            _regionService         = regionService;
            _sellerService         = sellerService;
            _fieldService          = fieldService;
            _mapper = mapper;

            ViewData["Messages"] = null;
            ViewData["IsAdmin"]  = false;
            ViewData["LoggedIn"] = _isAuthenticated;
        }
Example #22
0
        public ProvinceType(
            IRegionService regions,
            IProvinceService provinces,
            ICommuneService communes
            )
        {
            Field(o => o.Code);
            Field(o => o.Name);
            Field(o => o.Lat);
            Field(o => o.Lng);

            Field <RegionType>(
                "region",
                "Región a la que pertenece la provincia.",
                resolve: context => regions.GetRegion(context.Source.ParentCode)
                );

            Field <ListGraphType <CommuneType> >(
                "communes",
                "Comunas pertenecientes a la provincia.",
                resolve: context => communes.GetCommunesByProvince(context.Source.Code)
                );
        }
        public void LoadSelectLists(ICountryRepository countriesRepository, IRegionService regionService)
        {
            var countries = countriesRepository.GetAll()
                            .OrderBy(c => c.Entity.Name);

            CountryList = CreateSelectList(countries, t => t.Entity.Name, t => t.ID, true, "Select country");

            if (CountryID != null)
            {
                var country = countries
                              .First(c => c.ID == CountryID);

                var regions = regionService.GetBirthableRegions(CountryID.Value);

                RegionsList = regions.Select(r => new SelectListItem()
                {
                    Text = r.CountryCoreID == r.CountryID ? r.Name : r.Name + "(occupied)"

                    ,
                    Value = r.ID.ToString()
                }).ToList();
            }
        }
        public static void StartSchedul(IHouseUsage2Service houseUsage2,
                                        IHouseUsageService houseUsage,
                                        ITotalTumoverService totalTumover,
                                        ITumoverService tumover,
                                        IRegionService region)
        {
            houseUsage2Service  = houseUsage2;
            houseUsageService   = houseUsage;
            totalTumoverService = totalTumover;
            tumoverService      = tumover;
            regionService       = region;

            IScheduler    sched        = new StdSchedulerFactory().GetScheduler();
            JobDetailImpl jdBossReport = new JobDetailImpl("getTumoverJob", typeof(GetTumoverJob));

            CronScheduleBuilder cronScheduleBuilder = CronScheduleBuilder.CronSchedule("0 30 * * * ? *");

            //CronScheduleBuilder cronScheduleBuilder = CronScheduleBuilder.CronSchedule("* * * * * ? *");
            IMutableTrigger triggerBossReport = cronScheduleBuilder.Build();

            triggerBossReport.Key = new TriggerKey("getTumoverTrigger");
            sched.ScheduleJob(jdBossReport, triggerBossReport);
            sched.Start();
        }
Example #25
0
 private void login()
 {
     if (_CountryService != null)
     {
         return;
     }
     if (!string.IsNullOrEmpty(tbLogin.Text) && !string.IsNullOrEmpty(tbPassword.Text))
     {
         ClientEnvironment.DoLogin(tbLogin.Text, tbPassword.Text);
     }
     else
     {
         ClientEnvironment.DoLogin("admin", "2");
     }
     tbLogin.Enabled    = false;
     tbPassword.Enabled = false;
     btnLogin.Enabled   = false;
     ClientEnvironment.InitServices();
     _CountryService  = ClientEnvironment.CountryService;
     _RegionService   = ClientEnvironment.RegionService;
     _StoreService    = ClientEnvironment.StoreService;
     _EmployeeService = ClientEnvironment.EmployeeService;
     ClientEnvironment.StoreService.BVCopyFromStoreComplete += new OperationCompleteDelegate(StoreService_BVCopyFromStoreComplete);
 }
 public RegionsController(IRegionService regionService)
 {
     _regionService = regionService;
 }
Example #27
0
 public RegionController(IRegionService regionService)
 {
     _regionService = regionService;
 }
        public WarsPenaltyCostCalculator(Citizen citizen, IWarRepository warRepository, IRegionService regionService) : base(regionService)
        {
            EnemyCountriesIDs = warRepository.GetDirectWarsForCountry(citizen.CitizenshipID)
                                .Select(w => w.AttackerCountryID == citizen.CitizenshipID ? w.DefenderCountryID : w.AttackerCountryID)
                                .ToArray();

            var indirectEnemiesIDs = warRepository.GetIndirectWarsForCountry(citizen.CitizenshipID)
                                     .SelectMany(w => w.CountryInWars)
                                     .Where(ciw => ciw.CountryID != citizen.CitizenshipID)
                                     .Select(ciw => ciw.CountryID)
                                     .ToList();

            indirectEnemiesIDs.AddRange(warRepository.GetDirectWarsForCountry(citizen.CitizenshipID)
                                        .SelectMany(w => w.CountryInWars)
                                        .Select(ciw => ciw.CountryID)
                                        .ToList());

            IndirectEnemyCountriesIDs = indirectEnemiesIDs.ToArray();
        }
Example #29
0
        /// <summary>
        /// 用户当前商品运费显示文本
        /// </summary>
        /// <param name="productId">商品Id</param>
        /// <param name="freightTemplate">运费末班</param>
        /// <param name="member">访问的用户</param>
        /// <param name="product">商品实体</param>
        /// <param name="buynumber">购买件数</param>
        /// <returns></returns>
        public static string GetFreightStr(long productId, FreightTemplateInfo freightTemplate, MemberInfo member = null, ProductInfo product = null, int buynumber = 1)
        {
            string freightStr = "免运费";

            if (freightTemplate == null || freightTemplate.IsFree == CommonModel.FreightTemplateType.Free)
            {
                return(freightStr);
            }

            IProductService productService = ServiceApplication.Create <IProductService>();

            #region 是否虚拟商品,如是虚拟商品免运费
            if (product == null)
            {
                product = productService.GetProduct(productId);
                if (product == null || product.ProductType == 1)//虚拟商品无运费
                {
                    return(freightStr);
                }
            }
            #endregion

            int addressId = 0;
            if (member != null)
            {
                var addressInfo = ShippingAddressApplication.GetDefaultUserShippingAddressByUserId(member.Id);
                if (addressInfo != null)
                {
                    addressId = addressInfo.RegionId;
                }
            }

            #region 当前是否是指定地区包邮
            if (addressId > 0)
            {
                bool    isFree = false; //当前地区是否为自定包邮
                decimal price  = 0;     //购买商品的金额

                var freeRegions = Service.GetShippingFreeRegions(freightTemplate.Id);
                if (freeRegions != null && freeRegions.Count() > 0)
                {
                    IRegionService regionService = ServiceProvider.Instance <IRegionService> .Create;
                    freeRegions.ForEach(p =>
                    {
                        p.RegionSubList = regionService.GetSubsNew(p.RegionId, true).Select(a => a.Id).ToList();
                    });
                    var regions = freeRegions.Where(p => p.RegionSubList.Contains(addressId));//根据模板设置的包邮地区过滤出当前配送地址所在地址
                    if (regions != null && regions.Count() > 0)
                    {
                        var groupIds   = regions.Select(p => p.GroupId).ToList();
                        var freeGroups = Service.GetShippingFreeGroupInfos(freightTemplate.Id, groupIds);

                        //只要有一个符合包邮,则退出
                        decimal amount = price * buynumber;
                        freeGroups.ForEach(p =>
                        {
                            if (p.ConditionType == 1)//购买件数
                            {
                                if (buynumber >= int.Parse(p.ConditionNumber))
                                {
                                    isFree = true;
                                    return;
                                }
                            }
                            else if (p.ConditionType == 2)//金额
                            {
                                if (amount >= decimal.Parse(p.ConditionNumber))
                                {
                                    isFree = true;
                                    return;
                                }
                            }
                            else if (p.ConditionType == 3)//件数+金额
                            {
                                var condition1 = int.Parse(p.ConditionNumber.Split('$')[0]);
                                var condition2 = decimal.Parse(p.ConditionNumber.Split('$')[1]);
                                if (buynumber >= condition1 && amount >= condition2)
                                {
                                    isFree = true;
                                    return;
                                }
                            }
                        });
                    }
                }

                if (isFree)
                {
                    return(freightStr);//直接返回免运费
                }
            }
            #endregion

            decimal freight = productService.GetFreight(new List <long>()
            {
                productId
            }, new List <int>()
            {
                1
            }, addressId, true);
            freightStr = freight <= 0 ? "免运费" : string.Format("运费 {0}元", freight.ToString("f2"));

            return(freightStr);
        }
 public ViewLoadedHandler(IRegionService regionService, IPluginDefinition[] plugins)
 {
     this.regionService = regionService;
     this.plugins       = plugins.OrderBy(plugin => plugin.Name);
 }
Example #31
0
 public StatisticsController(IStatisticsService iStatisticsService, IRegionService iRegionService)
 {
     _iStatisticsService = iStatisticsService;
     _iRegionService     = iRegionService;
 }
Example #32
0
        public static void InitServices()
        {
            // when connection is lost, it seems old references are no longer valid
            _ImportParam.CountryService = null;
            _ImportParam.EmployeeService = null;
            _ImportParam.RegionService = null;
            _ImportParam.StoreService = null;
            _UserService = null;
            _CountryService = null;
            _LanguageService = null;
            _EmployeeService = null;
            _StoreService = null;
            _RegionService = null;
            _AuthService = null;
            _RoleService = null;

            RoleService.Init();
            UserService.Init();
            CountryService.Init();
            LanguageService.Init();
            AvgAmountService.Init();
            CountryAdditionalHourService.Init();
            ColouringService.Init();
            FeastService.Init();
            AbsenceService.Init();
            WorkingModelService.Init();
            YearlyWorkingDayService.Init();
            EmployeeService.Init();
            EmployeeRelationService.Init();
            EmployeeAllInService.Init();
            EmployeeContractService.Init();
            LongTimeAbsenceService.Init();
            EmployeeLongTimeAbsenceService.Init();
            StoreService.Init();
            WGRService.Init();
            HWGRService.Init();
            WorldService.Init();
            StoreToWorldService.Init();
            WorldToHWGRService.Init();
            HwgrToWgrService.Init();
            StoreWorkingTimeService.Init();
            StoreAdditionalHourService.Init();
            BufferHoursService.Init();
            BufferHourAvailableService.Init();
            BenchmarkService.Init();
            TrendCorrectionService.Init();
            PersonMinMaxService.Init();
            RegionService.Init();

            AbsenceTimePlanningService.Init();
            AbsenceTimeRecordingService.Init();
            WorkingTimePlanningService.Init();
            WorkingTimeRecordingService.Init();
            EmployeeTimeService.Init();
            AvgWorkingDaysInWeekService.Init();
            EmployeeDayStatePlanningService.Init();
            EmployeeDayStateRecordingService.Init();
            EmployeeWeekTimePlanningService.Init();
            EmployeeWeekTimeRecordingService.Init();
            EmployeePlanningWorkingModelService.Init();
            EmployeeRecordingWorkingModelService.Init();
            EmployeeHolidaysInfoService.Init();

            _ImportParam.CountryService = CountryService;
            _ImportParam.EmployeeService = EmployeeService;
            _ImportParam.RegionService = RegionService;
            _ImportParam.StoreService = StoreService;
        }
Example #33
0
 public RegionController(IRegionService regionService, IMapper mapper)
 {
     _regionService = regionService;
     _mapper        = mapper;
 }
 public RegionsController(IRegionService regionService, IMapper mapper) : base(regionService, mapper)
 {
     _service = regionService;
 }
        public ViewCompanyViewModel(Company company, IProductRepository productRepository, ICompanyService companyService, CompanyRights companyRights, IRegionService regionService, IRegionRepository regionRepository)
        {
            IProductService productService = DependencyResolver.Current.GetService <IProductService>();

            Info              = new CompanyInfoViewModel(company);
            Quality           = company.Quality;
            Money             = MoneyViewModel.GetMoney(company.Entity.Wallet);
            ShowEmployeeStats = true;
            Queue             = (double)company.Queue;
            Rights            = companyRights;

            initializeEmployees(company, companyService);

            initializeRequiredProducts(company, productRepository, productService);

            initializeProducedStock(company, productRepository);

            if (Rights.HaveAnyRights)
            {
                Statistics = new CompanyStatisticsViewModel(company, companyService, regionService, regionRepository);
            }
        }
Example #36
0
 internal ImportStore(string fileName, ICountryService countryService, IRegionService regionService, IStoreService storeService)
     : base(fileName, countryService, regionService)
 {
     _IStoreService = storeService;
 }
Example #37
0
 public CountryService(DataContext db, IRegionService regionService)
 {
     this.regionService = regionService;
     this.db = db;
 }
Example #38
0
 public ComputeService(ISubjectService subjectService, IRegionService regionService, IEventAggregator eventAggregator)
 {
     _subjectService = subjectService;
     _regionService = regionService;
     _eventAggregator = eventAggregator;
 }
Example #39
0
 public PaymentConfigController(IRegionService iRegionService, IPaymentConfigService iPaymentConfigService)
 {
     _iRegionService        = iRegionService;
     _iPaymentConfigService = iPaymentConfigService;
 }
 public RegionsController(IRegionService regionService)
 {
     this.regionService = regionService;
 }
Example #41
0
 public CompanyController(ICompanyService companyService, IPostOfficeService officeService, IRegionService regionService)
 {
     _companyService = companyService;
     _officeService  = officeService;
     _regionService  = regionService;
 }
Example #42
0
 public RegionController(IRegionService regionService, ICommandDispatcher commandDispatcher)
 {
     this._regionService = regionService;
     this._commandDispatcher = commandDispatcher;
 }
Example #43
0
 /// <summary>
 /// Контроллер регионов.
 /// </summary>
 /// <param name="regionService">Сервис регионов.</param>
 public RegionController(IRegionService regionService)
 {
     this.RegionService = regionService;
 }
 public YandexTrafficProvider(string proxy, IRegionService regionService) : base(regionService)
 {
     _proxy = proxy;
 }
Example #45
0
 public FnRegion(IRegionService regionService)
 {
     this.regionService = regionService;
 }
Example #46
0
 public ViewLoadedHandler(IViewResolver viewProvider, IConventionsHandler conventions, IRegionService regionService, IRegionInjectionHandler autoMappingHandler)
 {
     this.viewProvider       = viewProvider;
     this.conventions        = conventions;
     this.regionService      = regionService;
     this.autoMappingHandler = autoMappingHandler;
 }
 public RegionsController(IRegionService service)
 {
     _service = service;
 }
 /// <summary>
 /// Instantiate RegionService
 /// </summary>
 /// <param name="regionService"></param>
 public RegionHandler(IRegionService regionService)
 {
     _regionService = regionService;
 }
Example #49
0
 public MemberController(IMemberService iMemberService, IRegionService iRegionService, IMemberLabelService iMemberLabelService)
 {
     _iMemberService      = iMemberService;
     _iRegionService      = iRegionService;
     _iMemberLabelService = iMemberLabelService;
 }
 public RegionController(IRegionService regionService, ISelectionDateService selectionDateService, ILumiaTrialFormDataService lumiaTrialFormDataService)
 {
     this.regionService = regionService;
     this.selectionDateService = selectionDateService;
     this.lumiaTrialFormDataService = lumiaTrialFormDataService;
 }
Example #51
0
 public HomeController(IPublicationService publicationService, IUserService userService,
                       IFavouritePublicationService favouritePublicationService, IRegionService RegionService,
                       ICategoryService categoryService, ISubCategoryService subCategoryService, ISubSubCategoryService subSubCategoryService, IPublicationDetailsService publicationDetailsService)
 {
     this.publicationService          = publicationService;
     this.userService                 = userService;
     this.favouritePublicationService = favouritePublicationService;
     this.RegionService               = RegionService;
     this.categoryService             = categoryService;
     this.subCategoryService          = subCategoryService;
     this.subSubCategoryService       = subSubCategoryService;
     this.publicationDetailsService   = publicationDetailsService;
 }
 public InstanceController(IRegionService regionService, IAccountService accountService, IInactivationService inactivationService)
 {
     this.regionService = regionService;
     this.accountService = accountService;
     this.inactivationService = inactivationService;
 }
Example #53
0
        public ApplicationServiceTests()
        {
            mapper = new ApplicationToPageModelMapper();

            pathDataService  = A.Fake <IPathDataService>();
            regionService    = A.Fake <IRegionService>();
            contentRetriever = A.Fake <IContentRetriever>();
            contentProcessor = A.Fake <IContentProcessorService>();

            defaultPathModel = new PathModel {
                Path = Path, TopNavigationOrder = 1, IsOnline = true
            };

            var headRegionEndPoint   = $"{RequestBaseUrl}/headRegionEndpoint";
            var bodyRegionEndPoint   = $"{RequestBaseUrl}/bodyRegionEndpoint";
            var footerRegionEndPoint = $"{RequestBaseUrl}/footerRegionEndpoint";

            defaultHeadRegion = new RegionModel {
                PageRegion = PageRegion.Head, RegionEndpoint = headRegionEndPoint, IsHealthy = true, OfflineHTML = OfflineHTML
            };
            defaultBodyRegion = new RegionModel {
                PageRegion = PageRegion.Body, RegionEndpoint = bodyRegionEndPoint, IsHealthy = true, OfflineHTML = OfflineHTML
            };
            defaultBodyFooterRegion = new RegionModel {
                PageRegion = PageRegion.BodyFooter, RegionEndpoint = footerRegionEndPoint, IsHealthy = true, OfflineHTML = OfflineHTML
            };
            defaultRegions = new List <RegionModel>
            {
                defaultHeadRegion,
                defaultBodyRegion,
                defaultBodyFooterRegion,
            };

            defaultPageViewModel = new PageViewModel
            {
                PageRegionContentModels = new List <PageRegionContentModel>
                {
                    new PageRegionContentModel
                    {
                        PageRegionType = PageRegion.Body,
                    },
                },
            };

            defaultApplicationModel = new ApplicationModel {
                Path = defaultPathModel, Regions = defaultRegions
            };
            offlineApplicationModel = new ApplicationModel {
                Path = new PathModel {
                    IsOnline = false, OfflineHtml = OfflineHTML
                }
            };

            A.CallTo(() => pathDataService.GetPath(Path)).Returns(defaultPathModel);
            A.CallTo(() => regionService.GetRegions(A <string> .Ignored)).Returns(defaultRegions);
            A.CallTo(() => contentRetriever.GetContent($"{defaultHeadRegion.RegionEndpoint}/index", defaultHeadRegion, A <bool> .Ignored, RequestBaseUrl)).Returns(HeadRegionContent);
            A.CallTo(() => contentRetriever.GetContent($"{defaultBodyRegion.RegionEndpoint}/index", defaultBodyRegion, A <bool> .Ignored, RequestBaseUrl)).Returns(BodyRegionContent);
            A.CallTo(() => contentRetriever.GetContent($"{defaultBodyFooterRegion.RegionEndpoint}", defaultBodyFooterRegion, A <bool> .Ignored, RequestBaseUrl)).Returns(BodyFooterRegionContent);
            A.CallTo(() => contentRetriever.GetContent($"{defaultBodyFooterRegion.RegionEndpoint}/index", defaultBodyFooterRegion, A <bool> .Ignored, RequestBaseUrl)).Returns(BodyFooterRegionContent);

            A.CallTo(() => contentProcessor.Process(HeadRegionContent, A <string> .Ignored, A <string> .Ignored)).Returns(HeadRegionContent);
            A.CallTo(() => contentProcessor.Process(BodyRegionContent, A <string> .Ignored, A <string> .Ignored)).Returns(BodyRegionContent);
            A.CallTo(() => contentProcessor.Process(BodyFooterRegionContent, A <string> .Ignored, A <string> .Ignored)).Returns(BodyFooterRegionContent);

            defaultFormPostParams = new List <KeyValuePair <string, string> > {
                new KeyValuePair <string, string>("formParam1", "testvalue")
            };

            taskHelper = A.Fake <ITaskHelper>();
            A.CallTo(() => taskHelper.TaskCompletedSuccessfully(A <Task> .Ignored)).Returns(true);

            applicationService = new ApplicationService(pathDataService, regionService, contentRetriever, contentProcessor, taskHelper)
            {
                RequestBaseUrl = RequestBaseUrl
            };
        }
Example #54
0
 public RegionControllerTests()
 {
     _regionService = A.Fake<IRegionService>();
     _regionController = new RegionController(_regionService);
 }
Example #55
0
 public RegionsController(ILogger <RegionsController> log,
                          IRegionService regionService)
 {
     _log           = log;
     _regionService = regionService;
 }
Example #56
0
 internal ImportRegion(string fileName, ICountryService countryService, IRegionService regionService)
     : base(fileName, countryService)
 {
     _RegionService = regionService;
 }
Example #57
0
 public AdminPanelController(IPostOfficeService officeService, IRegionService regionService)
 {
     _officeService = officeService;
     _regionService = regionService;
 }
Example #58
0
 private void login()
 {
     if (_CountryService != null) return;
     if (!string.IsNullOrEmpty(tbLogin.Text)&& !string.IsNullOrEmpty(tbPassword.Text))
         ClientEnvironment.DoLogin(tbLogin.Text, tbPassword.Text);
     else
         ClientEnvironment.DoLogin("admin", "2");
     tbLogin.Enabled = false;
     tbPassword.Enabled = false;
     btnLogin.Enabled = false;
     ClientEnvironment.InitServices();
     _CountryService = ClientEnvironment.CountryService;
     _RegionService = ClientEnvironment.RegionService;
     _StoreService = ClientEnvironment.StoreService;
     _EmployeeService = ClientEnvironment.EmployeeService;
     ClientEnvironment.StoreService.BVCopyFromStoreComplete += new OperationCompleteDelegate(StoreService_BVCopyFromStoreComplete);
 }