Example #1
0
 public Handler(ILookupCache driveCache, IMediator mediator, ILogger log)
 {
     _poBoxes       = driveCache.PoBoxes;
     _exclusions    = driveCache.PoBoxExclusions;
     _zipExclusions = driveCache.PoBoxZipCodesWithExclusions;
     _mediator      = mediator;
     _log           = log;
 }
Example #2
0
 public PersonController(
     IPersonService personService,
     ILookupCache _lcache,
     IDefaults def,
     IMapper map)
 {
     this.personService = personService;
     this.lcache        = _lcache;
     this.map           = map;
     this.def           = def;
 }
 public WorkAssignmentController(IWorkAssignmentService workAssignmentService,
                                 IWorkerService workerService,
                                 IWorkOrderService workOrderService,
                                 IWorkerSigninService signinService,
                                 ILookupCache lc)
 {
     this.waServ = workAssignmentService;
     this.wkrServ = workerService;
     this.woServ = workOrderService;
     this.wsiServ = signinService;
     this.lcache = lc;
 }
Example #4
0
 public EmailController(
     IEmailService eServ,
     ILookupCache lc,
     IDefaults def,
     IMapper map
     )
 {
     this.serv   = eServ;
     this.lcache = lc;
     this.map    = map;
     this.def    = def;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="woServ">Work Order service</param>
 /// <param name="waServ">Work Assignment service</param>
 /// <param name="eServ">Employer service</param>
 /// <param name="wServ">Worker service</param>
 /// <param name="wrServ">Worker request service</param>
 /// <param name="lcache">Lookup cache</param>
 public WorkOrderController(IWorkOrderService woServ,
                            IWorkAssignmentService waServ,
                            IEmployerService eServ,
                            IWorkerService wServ,
                            IWorkerRequestService wrServ,
                            ILookupCache lcache)
 {
     this.woServ = woServ;
     this.eServ = eServ;
     this.wServ = wServ;
     this.waServ = waServ;
     this.wrServ = wrServ;
     this.lcache = lcache;
 }
Example #6
0
        public WorkAssignmentController(IWorkAssignmentService workAssignmentService,
                                        IWorkerService workerService,
                                        IWorkOrderService workOrderService,
                                        IWorkerSigninService signinService,
                                        ILookupCache lc,
                                        IDefaults def,
                                        IMapper map)

        {
            this.waServ  = workAssignmentService;
            this.wkrServ = workerService;
            this.woServ  = workOrderService;
            this.wsiServ = signinService;
            this.lcache  = lc;
            this.map     = map;
            this.def     = def;
        }
Example #7
0
 public HitCalculator(ILogger <HitCalculator> logger, IDatabaseContextFactory contextFactory,
                      ILookupCache <EFHitLocation> hitLocationCache, ILookupCache <EFWeapon> weaponCache,
                      ILookupCache <EFWeaponAttachment> attachmentCache,
                      ILookupCache <EFWeaponAttachmentCombo> attachmentComboCache,
                      ILookupCache <EFServer> serverCache, ILookupCache <EFMeansOfDeath> modCache, IHitInfoBuilder hitInfoBuilder,
                      IServerDistributionCalculator serverDistributionCalculator)
 {
     _contextFactory               = contextFactory;
     _logger                       = logger;
     _hitLocationCache             = hitLocationCache;
     _weaponCache                  = weaponCache;
     _attachmentCache              = attachmentCache;
     _attachmentComboCache         = attachmentComboCache;
     _serverCache                  = serverCache;
     _hitInfoBuilder               = hitInfoBuilder;
     _modCache                     = modCache;
     _serverDistributionCalculator = serverDistributionCalculator;
 }
Example #8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="woServ">Work Order service</param>
 /// <param name="waServ">Work Assignment service</param>
 /// <param name="eServ">Employer service</param>
 /// <param name="wServ">Worker service</param>
 /// <param name="wrServ">Worker request service</param>
 /// <param name="lcache">Lookup cache</param>
 public WorkOrderController(IWorkOrderService woServ,
                            IWorkAssignmentService waServ,
                            IEmployerService eServ,
                            IWorkerService wServ,
                            IWorkerRequestService wrServ,
                            ILookupCache lcache,
                            IDefaults def,
                            IMapper map)
 {
     this.woServ = woServ;
     this.eServ  = eServ;
     this.wServ  = wServ;
     this.waServ = waServ;
     this.wrServ = wrServ;
     this.lcache = lcache;
     this.map    = map;
     this.def    = def;
 }
Example #9
0
 public ReportService(IWorkOrderRepository woRepo,
                      IWorkAssignmentRepository waRepo,
                      IWorkerRepository wRepo,
                      IWorkerSigninRepository wsiRepo,
                      IWorkerRequestRepository wrRepo,
                      ILookupRepository lookRepo,
                      ILookupCache lookCache,
                      IEmployerRepository eRepo,
                      IActivitySigninRepository asRepo)
 {
     this.woRepo = woRepo;
     this.waRepo = waRepo;
     this.wRepo = wRepo;
     this.wsiRepo = wsiRepo;
     this.wrRepo = wrRepo;
     this.lookRepo = lookRepo;
     this.lookCache = lookCache;
     this.eRepo = eRepo;
     this.asRepo = asRepo;
 }
Example #10
0
        //
        // Initialize once to prevent re-querying DB
        //
        public static void Initialize(ILookupCache lc)
        {
            lcache = lc;
            hoursNum = new SelectList(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" }
                .Select(x => new LookupNumber { Value = x, Text = x }),
                "Value", "Text", "7"
                );
            daysNum = new SelectList(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14" }
                .Select(x => new LookupNumber { Value = x, Text = x }),
                "Value", "Text", "7"
                );
            skillLevelNum = new SelectList(new[] { "0", "1", "2", "3" }
                .Select(x => new SelectListItem { Value = x, Text = x }),
                "Value", "Text", "0");
            categories = new SelectList(new[] {
                LCategory.maritalstatus, LCategory.race, LCategory.neighborhood, LCategory.gender,
                LCategory.transportmethod, LCategory.transportTransactType, LCategory.countryoforigin, LCategory.activityName,
                LCategory.activityType, LCategory.eventtype, LCategory.orderstatus, LCategory.emplrreference,
                LCategory.worktype, LCategory.memberstatus,LCategory.skill,LCategory.emailstatus, LCategory.emailTemplate, LCategory.housingType,
                LCategory.vehicleTypeID, LCategory.workerRating, LCategory.incomeSourceID, LCategory.usBornChildren, LCategory.educationLevel,
                LCategory.farmLabor, LCategory.training }
                .Select(x => new SelectListItem { Value = x, Text = x}),
                "Value", "Text", LCategory.activityName);

            yesnoEN = new List<SelectListItem>();
            yesnoEN.Add(new SelectListItem() { Selected = false, Text = "No", Value = "false" });
            yesnoEN.Add(new SelectListItem() { Selected = false, Text = "Yes", Value = "true" });
            yesnoES = new List<SelectListItem>();
            yesnoES.Add(new SelectListItem() { Selected = false, Text = "No", Value = "false" });
            yesnoES.Add(new SelectListItem() { Selected = false, Text = "Sí", Value = "true" });
        }
Example #11
0
 public PersonController(IPersonService personService, ILookupCache _lcache)
 {
     this.personService = personService;
     this.lcache = _lcache;
 }
Example #12
0
 static LookupCache()
 {
     _instance = new LookupCache();
 }
 // We need an instance of DbLookupRetriever and an instance of LookupCache
 internal CacheLookupRetriever(ILookupRetriever <T> backupLookupRetriever)
 {
     _backupLookupRetriever = backupLookupRetriever;
     _lookupCache           = LookupCache.Instance;
 }
 public Handler(ILookupCache driveCache, ILogger log)
 {
     _log      = log;
     _zipCache = driveCache.ZipCodesGrids;
 }
Example #15
0
        //
        // Initialize once to prevent re-querying DB
        //
        //public static void Initialize(IEnumerable<Lookup> cache)
        public static void Initialize(ILookupCache lc, IDatabaseFactory plop)
        {
            lcache = lc;
            Db = plop;
            hoursNum = new SelectList(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" }
                .Select(x => new LookupNumber { Value = x, Text = x }),
                "Value", "Text", "7"
                );
            daysNum = new SelectList(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14" }
                .Select(x => new LookupNumber { Value = x, Text = x }),
                "Value", "Text", "7"
                );
            skillLevelNum = new SelectList(new[] { "0", "1", "2", "3" }
                .Select(x => new SelectListItem { Value = x, Text = x }),
                "Value", "Text", "0");
            categories = new SelectList(new[] {
                LCategory.maritalstatus, LCategory.race, LCategory.neighborhood, LCategory.gender,
                LCategory.transportmethod, LCategory.countryoforigin, LCategory.activityName,
                LCategory.activityType, LCategory.eventtype, LCategory.orderstatus, LCategory.emplrreference,
                LCategory.worktype, LCategory.memberstatus,LCategory.skill,LCategory.emailstatus, LCategory.emailTemplate}
                .Select(x => new SelectListItem { Value = x, Text = x}),
                "Value", "Text", LCategory.activityName);

            yesnoEN = new List<SelectListItem>();
            yesnoEN.Add(new SelectListItem() { Selected = false, Text = "No", Value = "false" });
            yesnoEN.Add(new SelectListItem() { Selected = false, Text = "Yes", Value = "true" });
            yesnoES = new List<SelectListItem>();
            yesnoES.Add(new SelectListItem() { Selected = false, Text = "No", Value = "false" });
            yesnoES.Add(new SelectListItem() { Selected = false, Text = "Sí", Value = "true" });
        }
Example #16
0
 public EmailController(IEmailService eServ, ILookupCache lc)
 {
     this.serv = eServ;
     lcache = lc;
 }
Example #17
0
        //
        // Initialize once to prevent re-querying DB
        //
        public Defaults(ILookupCache lc, IConfigService cfg, ITransportProvidersService tpServ)
        {
            cfgServ     = cfg;
            lcache      = lc;
            this.tpServ = tpServ;
            hoursNum    = new SelectList(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" }
                                         .Select(x => new LookupNumber {
                Value = x, Text = x
            }),
                                         "Value", "Text", "7"
                                         );
            daysNum = new SelectList(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14" }
                                     .Select(x => new LookupNumber {
                Value = x, Text = x
            }),
                                     "Value", "Text", "7"
                                     );
            skillLevelNum = new SelectList(new[] { "0", "1", "2", "3" }
                                           .Select(x => new SelectListItem {
                Value = x, Text = x
            }),
                                           "Value", "Text", "0");
            categories = new SelectList(
                new[] {
                LCategory.maritalstatus,
                LCategory.race,
                LCategory.neighborhood,
                LCategory.gender,
                LCategory.transportmethod,
                LCategory.transportTransactType,
                LCategory.countryoforigin,
                LCategory.activityName,
                LCategory.activityType,
                LCategory.eventtype,
                LCategory.orderstatus,
                LCategory.emplrreference,
                LCategory.worktype,
                LCategory.memberstatus,
                LCategory.skill,
                LCategory.emailstatus,
                LCategory.emailTemplate,
                LCategory.housingType,
                LCategory.vehicleTypeID,
                LCategory.workerRating,
                LCategory.incomeSourceID,
                LCategory.usBornChildren,
                LCategory.educationLevel,
                LCategory.farmLabor,
                LCategory.training,
                LCategory.income
            }
                .Select(x => new SelectListItem {
                Value = x, Text = x
            }),
                "Value", "Text", LCategory.activityName);

            yesnoEN = new List <SelectListItem>();
            yesnoEN.Add(new SelectListItem()
            {
                Selected = false, Text = "No", Value = "false"
            });
            yesnoEN.Add(new SelectListItem()
            {
                Selected = false, Text = "Yes", Value = "true"
            });
            yesnoES = new List <SelectListItem>();
            yesnoES.Add(new SelectListItem()
            {
                Selected = false, Text = "No", Value = "false"
            });
            yesnoES.Add(new SelectListItem()
            {
                Selected = false, Text = "Sí", Value = "true"
            });
        }
Example #18
0
 public Handler(ILookupCache driveCache, ILogger log)
 {
     _log        = log;
     _placeGrids = driveCache.PlaceGrids;
 }
Example #19
0
 static LookupCache()
 {
     _instance = new LookupCache();
 }
 public Handler(ILookupCache driveCache, IMediator mediator, ILogger log)
 {
     _driveCache = driveCache;
     _mediator   = mediator;
     _log        = log;
 }