Пример #1
0
 public HubSpotService(
     IDealService dealService,
     IContactService contactService)
 {
     _dealService    = dealService;
     _contactService = contactService;
 }
Пример #2
0
 public DealsController(IAccountService accountService, IPublisherService publisherService, IDealService dealService, IMappingEngine mapping)
 {
     _accountService   = accountService;
     _publisherService = publisherService;
     _dealService      = dealService;
     _mapping          = mapping;
 }
Пример #3
0
 public DealController(ILogger <DealController> logger, IDealService brandService, RubiDBSettings rubiDBSettings)
 {
     _logger         = logger;
     _dealService    = brandService;
     _rubiDBSettings = rubiDBSettings;
     rubiDataConnect = new RUBIDataConnect(_rubiDBSettings.ConnectionString);
 }
Пример #4
0
 public DealController(IDealService dealService, UserManager <ApplicationUser> userManager, ApplicationDbContext dbContext, INotificationService notificationService)
 {
     _dealService         = dealService;
     _userManager         = userManager;
     _dbContext           = dbContext;
     _notificationService = notificationService;
 }
Пример #5
0
 public ClientService(ITaskRepository taskRepository)
 {
     dealService = IoCContainer.Resolve <IDealService>();
     dealPaymentDocumentService = IoCContainer.Resolve <IDealPaymentDocumentService>();
     clientRepository           = IoCContainer.Resolve <IClientRepository>();
     this.taskRepository        = taskRepository;
 }
 public RemoveController(
     IUserService userService,
     IFeatureService featureService,
     ILocationService locationService,
     ICustomerService customerService,
     IDivisionService divisionService,
     IPropertyService propertyService,
     IItemService itemService,
     IDealService dealService,
     IPaymentService paymentService,
     IEmployeeService employeeService,
     IReminderService reminderService,
     IPictureService pictureService
     )
 {
     _userService     = userService;
     _customerService = customerService;
     _locationService = locationService;
     _featureService  = featureService;
     _propertyService = propertyService;
     _divisionService = divisionService;
     _itemService     = itemService;
     _dealService     = dealService;
     _employeeService = employeeService;
     _paymentService  = paymentService;
     _reminderService = reminderService;
     _pictureService  = pictureService;
 }
 public MiddletonOrderProcessor(IDealService dealService, IChamberOfCommerceApi chamberOfCommerceApi, IAdvertPrinter printer, IRandomHelper randomHelper)
 {
     _dealService          = dealService;
     _chamberOfCommerceApi = chamberOfCommerceApi;
     _printer      = printer;
     _randomHelper = randomHelper;
 }
Пример #8
0
 public AdminController(IAdminService adminService,
     IUserService userService,
     IBanService banService,
     IBuildingService buildingService,
     IQueueService queueService,
     IUserBuildingService userBuildingService,
     IUserProductService userProductService,
     IMapService mapService,
     IMarketService marketService,
     IDolarService dolarService,
     IDealService dealService,
     INotificationService notificationService,
     IProductService productService,
     IMessageService messageService,
     IProductRequirementsService productRService)
 {
     _adminService = adminService;
     _userService = userService;
     _banService = banService;
     _buildingService = buildingService;
     _queueService = queueService;
     _userBuildingService = userBuildingService;
     _userProductService = userProductService;
     _mapService = mapService;
     _marketService = marketService;
     _dolarService = dolarService;
     _dealService = dealService;
     _notificationService = notificationService;
     _productService = productService;
     _messageService = messageService;
     _productRService = productRService;
 }
Пример #9
0
 public IndexModel(
     IDealService dealService,
     IStringLocalizer <SharedResource> sharedLocalizer)
 {
     _dealService = dealService;
     _localizer   = sharedLocalizer;
 }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VisaController" /> class.
 /// </summary>
 /// <param name="dealsServices">Deal Service</param>
 /// <param name="configuration">Config</param>
 /// <param name="visaServices">visa Service</param>
 /// <param name="mapper">mapper</param>
 /// <param name="masterService">master service</param>
 public VisaController(IDealService dealsServices, IConfiguration configuration, IMasterService masterService, IVisaService visaServices, IMapper mapper)
     : base(mapper, configuration)
 {
     this.dealsServices = dealsServices;
     this.masterService = masterService;
     this.visaServices  = visaServices;
 }
Пример #11
0
        public ClientOrganizationService(IClientOrganizationRepository clientOrganizationRepository)
        {
            this.clientOrganizationRepository = clientOrganizationRepository;

            expenditureWaybillIndicatorService = IoCContainer.Resolve <IExpenditureWaybillIndicatorService>();
            dealService         = IoCContainer.Resolve <IDealService>();
            organizationService = IoCContainer.Resolve <IOrganizationService>();
        }
Пример #12
0
 public UserController(UserManager <ApplicationUser> userManager, IUserService userService, ICategoryService categoryService, INotificationService notificationService, IDealService dealService)
 {
     _userManager         = userManager;
     _userService         = userService;
     _categoryService     = categoryService;
     _notificationService = notificationService;
     _dealService         = dealService;
 }
Пример #13
0
 public DealController(IDealService dealService, IMembershipService membershipService, IHubContext hubContext,
                       ILog logger)
 {
     _dealService       = dealService;
     _membershipService = membershipService;
     _appHub            = hubContext;
     _logger            = logger;
 }
Пример #14
0
        public MainWindow(AgentViewModels agentUser) : this()
        {
            dataBase = new EntityUnitOfWork("AgencyDB");

            Mapper.Reset();
            Mapper.Initialize(cfg =>
            {
                cfg.CreateMap <Agent, AgentViewModels>();
                cfg.CreateMap <Applicant, ApplicantViewModels>();//;.PreserveReferences();
                cfg.CreateMap <Employer, EmployerViewModels>();
                cfg.CreateMap <Position, PositionViewModels>();
                cfg.CreateMap <Vacancie, VacancieViewModels>();
                cfg.CreateMap <Role, RoleViewModels>();
                cfg.CreateMap <Deal, DealViewModels>();
                cfg.CreateMap <Contract, ContractViewModel>();
                cfg.CreateMap <PaymentAccount, PaymentAccountViewModel>();
            });

            agentService          = new AgentService(dataBase);
            applicantService      = new ApplicantService(dataBase);
            employerService       = new EmployerService(dataBase);
            positionService       = new PositionService(dataBase);
            vacancyService        = new VacancieService(dataBase);
            dealService           = new DealService(dataBase);
            roleService           = new RoleService(dataBase);
            contractService       = new ContractService(dataBase);
            paymentAccountService = new PaymentAccountService(dataBase);

            applicantsModel     = applicantService.GetAll();
            employersModel      = employerService.GetAll();
            rolesModel          = roleService.GetAll();
            agentsModel         = agentService.GetAll();
            positionsModel      = positionService.GetAll();
            vacanciesModel      = vacancyService.GetAll();
            dealsModel          = dealService.GetAll();
            contractModel       = contractService.GetAll();
            paymentAccountModel = paymentAccountService.GetAll();

            dGridApplicants.DataContext     = applicantsModel.Where(p => (p.Deals.Count < 1) & p.AgentId == agentUser.AgentId);
            dGridEmployer.DataContext       = employersModel;
            dGridPosition.DataContext       = positionsModel;
            dGridAgent.DataContext          = agentsModel;
            dGridVacancies.DataContext      = vacanciesModel;
            dGridDeals.DataContext          = dealsModel.Where(p => p.Applicant.AgentId == agentUser.AgentId);;
            dGridContract.DataContext       = contractModel.Where(p => p.AgentId == agentUser.AgentId);
            dGridPaymentAccount.DataContext = paymentAccountModel.Where(p => p.Contracts.AgentId == agentUser.AgentId);

            dGridReportWoman.DataContext = vacanciesModel.Where(p => p.Gender == Gender.женщина || p.Gender == Gender.любой);
            dGridReportMan.DataContext   = vacanciesModel.Where(p => p.Gender == Gender.мужчина || p.Gender == Gender.любой);
            cbPositions.ItemsSource      = positionsModel;
            if (agentUser.RoleId == 3)
            {
                tabAgents.Visibility = Visibility.Collapsed;
            }

            logger.Info("Application started");
        }
Пример #15
0
        /// <summary>
        /// API для сделок
        /// </summary>
        public DealController(
            IDealService dealService
            )
        {
            _dealService = dealService;

            //TODO авторизация пользователя
            _userId = Guid.Parse("ee01b062-7613-4eb5-a2aa-c614a977a51f");
        }
Пример #16
0
 public OrderOfferController(IOrderOffersService orderOffersService, UserManager <ApplicationUser> userManager, ApplicationDbContext db, IDealService dealService, INotificationService notificationService, SignInManager <ApplicationUser> signInManager)
 {
     _orderOffersService = orderOffersService;
     _userManager        = userManager;
     _db                  = db;
     _dealService         = dealService;
     _signInManager       = signInManager;
     _notificationService = notificationService;
 }
Пример #17
0
        public PaymentService(IUserService userService, IDealService dealService, IBankApi bankApi, ITrueMoneyContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            _bankApi = bankApi;
            _context = context;
        }
Пример #18
0
 public AddModel(
     IDealService dealService,
     IItemService itemService,
     IStringLocalizer <SharedResource> sharedLocalizer
     )
 {
     _dealService = dealService;
     _itemService = itemService;
     _localizer   = sharedLocalizer;
 }
Пример #19
0
 public OperationsController(IResourceService resourceService, IUserResourcesService userResourcesService,
                             IDealService dealService, IHubContext hubContext, ILog logger)
 {
     _resourceService      = resourceService;
     _userResourcesService = userResourcesService;
     _dealService          = dealService;
     _appHub          = hubContext;
     _logger          = logger;
     _pricesGenerator = PricesGenerator.GetInstance(_resourceService, _appHub);
 }
Пример #20
0
 public AccountController(IMembershipService membershipService, IHubContext hubContext, ILog logger,
                          ISendEmailService sendEmailService, IUserResourcesService userResourcesService, IDealService dealService)
 {
     _membershipService    = membershipService;
     _appHub               = hubContext;
     _logger               = logger;
     _sendEmailService     = sendEmailService;
     _userResourcesService = userResourcesService;
     _dealService          = dealService;
 }
Пример #21
0
 public SubmitDealService(RubiDBSettings rubiDBSettings, IUserService userService, IDealService dealService, IClientService clientService, IHttpContextAccessor httpContextAccessor)
 {
     _rubiDBSettings      = rubiDBSettings;
     _httpContextAccessor = httpContextAccessor;
     _userService         = userService;
     _dealService         = dealService;
     _clientService       = clientService;
     _user            = _userService.GetById(_httpContextAccessor.HttpContext.User.Claims.First(i => i.Type == "id").Value);
     _rubiDataConnect = new RUBIDataConnect(rubiDBSettings.ConnectionString);
 }
Пример #22
0
        public FrontEndDealsController(IDealService dealService, IOrderService orderService)
        {
            this.dealService = dealService;
            this.orderService = orderService;

            AutoMapper.Mapper.CreateMap<DealModel, FrontEndDeal>()
                .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Key.ToString()))
                .AfterMap((dest, src) =>
                {
                    src.ThumbnailUrls = dest.Images.Select(i => ImageHelper.GenerateThumbnailPath(i.RelativeUrl)).ToList();
                });

            AutoMapper.Mapper.CreateMap<DealAttributeModel, FrontEndSpecificDealAttribute>()
                .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Key.ToString()));

            AutoMapper.Mapper.CreateMap<DealOptionModel, FrontDealSpecificDealOption>()
                .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Key.ToString()))
                .AfterMap((dest, src) =>
                {
                    if (src.DealAttributes.Any())
                    {
                        return;
                    }

                    foreach (var attr in dest.Attributes.OrderBy(a => a.Order))
                    {
                        var converted = AutoMapper.Mapper.Map<FrontEndSpecificDealAttribute>(attr);
                        src.DealAttributes.Add(converted);
                    }
                });

            AutoMapper.Mapper.CreateMap<DealCategoryModel, FrontEndCategoryViewModel>()
                .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Key.ToString()))
                 .ForMember(dest => dest.Icon, opt => opt.MapFrom(src => src.Icon.ToString()))
                .ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.Name.ToString()));

            AutoMapper.Mapper.CreateMap<DealModel, FrontEndSpecificDeal>()
                .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Key.ToString()))
                .ForMember(dest => dest.ImageUrls, opt => opt.MapFrom(src => src.Images.Select(i => i.RelativeUrl)))
                .ForMember(dest => dest.StartTime, opt => opt.MapFrom(src => src.StartTime))
                .AfterMap((dest, src) =>
                {
                    if (src.DealOptions.Any())
                    {
                        return;
                    }

                    foreach (var option in dest.Options)
                    {
                        var converted = AutoMapper.Mapper.Map<FrontDealSpecificDealOption>(option);
                        src.DealOptions.Add(converted);
                    }
                });
        }
Пример #23
0
 public DistrictOrderFactory(IChamberOfCommerceApi chamberOfCommerceApi,
                             IAdvertPrinter printer,
                             IDealService dealService,
                             IDateTimeResolver dateTimeResolver,
                             IRandomHelper randomHelper)
 {
     _chamberOfCommerceApi = chamberOfCommerceApi;
     _printer          = printer;
     _dealService      = dealService;
     _dateTimeResolver = dateTimeResolver;
     _randomHelper     = randomHelper;
 }
Пример #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="tableCacheHandler">to store result in blob cache</param>
 /// <param name="homePageBusiness">Cache Data from storage</param>
 /// <param name="stateService">State Service</param>
 /// <param name="configuration">Web Config</param>
 /// <param name="homePageService">Home Page Service</param>
 /// <param name="countryService">The Country Service.</param>
 /// <param name="cityService">The City Service.</param>
 /// <param name="listingService">Listing Service</param>
 /// <param name="blogService">Blog Service</param>
 /// <param name="curationService">Curation Service</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="masterService">The master service.</param>
 /// <param name="domainSetting">The domain setting.</param>
 /// <param name="hostingEnvironment">The hosting environment.</param>
 /// <param name="viewRenderService">The view render service.</param>
 /// <param name="userDetailService">The user detail service.</param>
 /// <param name="package">The package.</param>
 /// <param name="hotelBookingService">The hotel booking service.</param>
 /// <param name="homeBanner">The home banner.</param>
 /// <param name="dealService">Deal Service</param>
 public HomeController(ITableCacheHandler tableCacheHandler, IHomePageBusiness homePageBusiness, IStateService stateService, IConfiguration configuration, IHomePageService homePageService, ICountryService countryService, ICityService cityService, IListingService listingService, IBlogService blogService, ICurationsService curationService, IMapper mapper, IMasterService masterService, IOptions <DomainSetting> domainSetting, IHostingEnvironment hostingEnvironment, IViewRenderService viewRenderService, IUserDetailService userDetailService, IPackageService package, IHotelBookingService hotelBookingService, IHomeBannerService homeBanner, IDealService dealService)
     : base(mapper, homePageService, cityService, countryService, configuration, stateService)
 {
     this.tableCacheHandler  = tableCacheHandler;
     this.homePageBusiness   = homePageBusiness;
     this.homePageService    = homePageService;
     this.listingService     = listingService;
     this.package            = package;
     this.hostingEnvironment = hostingEnvironment;
     this.viewRenderService  = viewRenderService;
     this.domainSetting      = domainSetting.Value;
     this.masterService      = masterService;
     this.dealService        = dealService;
 }
 public HubSpotToConstantContactService(
     IHubSpotService hubSpotService,
     IDealService dealService,
     IConstantContactService constantContactService,
     IContactService contactService,
     APIContext context,
     HubSpotToCCIntegrationLogService logService
     )
 {
     _hubSpotService         = hubSpotService;
     _dealService            = dealService;
     _constantContactService = constantContactService;
     _contactService         = contactService;
     _context    = context;
     _logService = logService;
 }
Пример #26
0
 public OfficeController(IUserBuildingService userBuildingService,
     IMarketService marketService,
     IUserProductService userProductService,
     INotificationService notificationService,
     IProductRequirementsService productRequirementService,
     IBuildingHelper buildingsHelper,
     IProductService productService,
     IMapService mapService,
     IUserService userService,
     IDealService dealService,
     ITutorialService tutorialService)
 {
     _userBuildingService = userBuildingService;
     _userProductService = userProductService;
     _marketService = marketService;
     _notificationService = notificationService;
     _dealService = dealService;
     _buildingsHelper = buildingsHelper;
     _productService = productService;
     _mapService = mapService;
     _userService = userService;
     _productRequirementService = productRequirementService;
     _tutorialService = tutorialService;
 }
Пример #27
0
 public DealController(IDealService dealService, ILogService logService)
     : base(logService)
 {
     _dealService = dealService;
 }
 public DealListViewModel(IDealService propertyMergeService, ICommonServices commonServices, DealViewModel propertyMergeViewModel) : base(commonServices)
 {
     DealService   = propertyMergeService;
     DealViewModel = propertyMergeViewModel;
 }
Пример #29
0
 public Deal(IDealService dealService)
     : this()
 {
     this.DealService = dealService;
 }
 public DealController(IDealService dealService)
 {
     this.dealService = dealService;
 }
Пример #31
0
 public DealCollection(IDealService dealService, ILogService logService) : base(logService)
 {
     DealService = dealService;
 }
Пример #32
0
 public DealsController(IDealService dealService, IUserService userSerivce)
 {
     this.dealService = dealService;
     this.userSerivce = userSerivce;
 }
 public ListingController(IListingService listingService, IOfferService offerService, IDealService dealService)
 {
     this.listingService = listingService;
     this.offerService   = offerService;
     this.dealService    = dealService;
 }
Пример #34
0
        static void Deal(IDealService dealService, DealType type, Action finished = null)
        {
            switch (type)
            {
            case DealType.All:
                dealService.Run(result =>
                {
                    string msg = $"Deal Running State:{result.State},{result.Message}";
                    if (result.Exception != null)
                    {
                        msg += $",Exception:{result.Exception.Message},{result.Exception.StackTrace}";
                    }
                    Console.WriteLine(msg);
                });
                break;

            case DealType.Recommend:
                dealService.RunRecommend(result =>
                {
                    string msg = $"Recommend Running State:{result.State},{result.Message}";
                    if (result.Exception != null)
                    {
                        msg += $",Exception:{result.Exception.Message},{result.Exception.StackTrace}";
                    }
                    Console.WriteLine(msg);
                });
                break;

            case DealType.Relation:
                dealService.RunRelation(result =>
                {
                    string msg = $"Relation Running State:{result.State},{result.Message}";
                    if (result.Exception != null)
                    {
                        msg += $",Exception:{result.Exception.Message},{result.Exception.StackTrace}";
                    }
                    Console.WriteLine(msg);

                    if (result.ServiceFinished)
                    {
                        finished.Invoke();
                    }
                });
                break;

            case DealType.UserCenter:
                dealService.RunUserCenter(result =>
                {
                    string msg = $"UserCenter Running State:{result.State},{result.Message}";
                    if (result.Exception != null)
                    {
                        msg += $",Exception:{result.Exception.Message},{result.Exception.StackTrace}";
                    }
                    Console.WriteLine(msg);
                });
                break;

            case DealType.FixServiceCenter:
                dealService.FixServiceCenter(ReadResult);
                break;
            }
        }