Пример #1
0
        /// <summary>
        /// Retrieves a setting
        /// </summary>
        /// <param name="services">The collection of lookup services</param>
        /// <param name="name">The name of the setting to retrieve</param>
        /// <param name="defaultValue">If the setting is not found, or there is an error retrieving the setting, this will be returned instead</param>
        /// <returns>The string setting (If you need to convert to something else, that will be done outside this call)</returns>
        public static string Get(ILookupServices <T, TS> services, string name, string defaultValue)
        => SafeTry.IgnoreException(
            () =>
        {
            var service = services.Service;
            if (service.Key == null)
            {
                return(defaultValue);
            }

            var cachingSeconds = CachingSeconds(service);

            // Get the collection of settings inside a Lock (this is possibly recursive, so can't use semaphore locking)
            var settingsCollection = NamedLocker.Lock($"{service.Key}_Locker",
                                                      num => num > 1
                            ? null // If recursive (will be allowed in lock again), the default value will be used instead of a real lookup
                            : GetItems(cachingSeconds, service, services.Cache));

            // If the above failed to find anything (eg. no settings, or a recursive call)
            if (settingsCollection.IsDefault())
            {
                return(defaultValue);
            }

            // Return the setting value (or default if no setting exists)
            var setting = service.GetItem(settingsCollection, name);
            return(setting.IsDefault() ? defaultValue : service.GetValue(setting));
        },
            defaultValue
            );
 public InventoryTransactionController(ICoreOrderService orderService, IPurchaseOrderService purchaseOrderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IProductServices productServices, IProductLookupService productLookupService) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _productServices      = productServices;
     _productLookupService = productLookupService;
     _lookupServices       = lookupServices;
     _purchaseOrderService = purchaseOrderService;
 }
 public BaseController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices)
 {
     OrderService    = orderService;
     PropertyService = propertyService;
     AccountServices = accountServices;
     LookupServices  = lookupServices;
 }
Пример #4
0
 public AccountController(ICoreOrderService orderService, IMarketServices marketServices, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IUserService userService, IInvoiceService invoiceService)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _marketServices = marketServices;
     _userService    = userService;
     _invoiceService = invoiceService;
     _lookupServices = lookupServices;
 }
Пример #5
0
 public RecruitmentController(HrmsDbContext context,
                              IHostingEnvironment environment,
                              ILookupServices lookup)
 {
     _context     = context;
     _environment = environment;
     _lookup      = lookup;
 }
Пример #6
0
        public HomeViewModel(
            ILookupServices lookupServices,
            IEventAggregator eventAggregator)
        {
            _lookupServices  = lookupServices;
            _eventAggregator = eventAggregator;

            MenuItems = new ObservableCollection <NavigationItemViewModel>();
        }
Пример #7
0
 public HomeController(ICoreOrderService orderService, IProductServices productServices, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IUserService userService, IActivityServices activityServices, ITenantsServices tenantServices)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _lookupServices   = lookupServices;
     _userService      = userService;
     _activityServices = activityServices;
     _tenantServices   = tenantServices;
     _productServices  = productServices;
 }
 public TenantConfigsController(ITenantsServices tenantsServices, ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IUserService userService, IInvoiceService invoiceService)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _userService     = userService;
     _invoiceService  = invoiceService;
     _lookupServices  = lookupServices;
     _accountServices = accountServices;
     _tenantsServices = tenantsServices;
 }
Пример #9
0
 public ApiOrdersSyncController(ITerminalServices terminalServices, IPurchaseOrderService purchaseOrderService,
                                ITenantLocationServices tenantLocationServices, IOrderService orderService,
                                IProductServices productServices, IUserService userService, ILookupServices lookupService, IProductServices productService) :
     base(terminalServices, tenantLocationServices, orderService, productServices, userService)
 {
     _lookupService        = lookupService;
     _purchaseOrderService = purchaseOrderService;
     _productService       = productService;
 }
Пример #10
0
 /// <summary>
 /// UsersController Constructor 
 /// </summary>
 /// <param name="oICommonServicesInitializer"></param>
 public CommonController(
                         IUserServices oIUserServicesInitializer,
                         ICommonServices oICommonServicesInitializer,
                         ILookupServices oILookupServicesInitializer
     )
 {
     this.oIUserServices = oIUserServicesInitializer;
     this.oICommonServices = oICommonServicesInitializer;
     this.oILookupServices = oILookupServicesInitializer;
 }
Пример #11
0
 public TimeLogController(IEmployeeShiftsServices employeeShiftsServices, IEmployeeShiftsStoresServices employeeShiftsStoresServices,
                          IEmployeeServices employeeServices, ITenantLocationServices tenantLocationsServices, IShiftsServices shiftsServices, ICoreOrderService orderService, IPropertyService propertyService,
                          IAccountServices accountServices, ILookupServices lookupServices, IActivityServices activityServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _employeeShiftsServices       = employeeShiftsServices;
     _employeeShiftsStoresServices = employeeShiftsStoresServices;
     _employeeServices             = employeeServices;
     _tenantLocationsServices      = tenantLocationsServices;
     _shiftsServices   = shiftsServices;
     _activityServices = activityServices;
 }
Пример #12
0
 public PurchaseOrdersController(ITenantLocationServices tenantLocationServices, ICoreOrderService orderService, IStockTakeApiService stockTakeApiService, IPropertyService propertyService, IAccountServices accountServices,
                                 ILookupServices lookupServices, IAppointmentsService appointmentsService, IProductServices productServices, IProductLookupService productLookupService, IGaneConfigurationsHelper ganeConfigurationHelper,
                                 IEmailServices emailServices, ICommonDbServices commonDbServices, ITenantLocationServices tenantLocationservices, ISalesOrderService salesOrderService, ITenantsServices tenantsServices)
     : base(orderService, propertyService, accountServices, lookupServices, appointmentsService, ganeConfigurationHelper, emailServices, tenantLocationservices, tenantsServices)
 {
     StockTakeApiService     = stockTakeApiService;
     _productServices        = productServices;
     _productLookupService   = productLookupService;
     _orderService           = orderService;
     _tenantLocationServices = tenantLocationServices;
     _salesServices          = salesOrderService;
     _accountServices        = accountServices;
     _commonDbServices       = commonDbServices;
 }
Пример #13
0
        public NavigationViewModel(
            IEventAggregator eventAggregator,
            ILookupServices lookupService)
        {
            _lookupService   = lookupService;
            _eventAggregator = eventAggregator;
            _eventAggregator.GetEvent <AfterNavigationEvent>()
            .Subscribe(OnAfterNavigationEnvet);

            MenuItems = new ObservableCollection <LookupItem>();
            Options   = new ObservableCollection <LookupItem>();

            NavCommand = new DelegateCommand(OnSelectLocation);
        }
Пример #14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientDocumentController"/> class.
        /// </summary>
        /// <param name="patientDocumentIt2Manager">
        /// <param name="officeNumber">
        /// The office number.
        /// </param>
        public PatientDocumentController(
            ILookupServices lookupServices,
            IMiscellaneousServices miscellaneousServices,
            IPatientServices patientServices,
            IPatientDocumentServices patientDocumentServices,
            PatientDocumentIt2Manager patientDocumentIt2Manager,
            DocumentIt2Manager documentIt2Manager,
            string officeNumber)
        {
            this.lookupServices            = lookupServices;
            this.miscellaneousServices     = miscellaneousServices;
            this.patientServices           = patientServices;
            this.patientDocumentServices   = patientDocumentServices;
            this.patientDocumentIt2Manager = patientDocumentIt2Manager;

            this.documentManager = documentIt2Manager;
        }
Пример #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientController"/> class.
        /// </summary>
        public PatientDocumentController()
        {
            this.lookupServices          = Container.Resolve <ILookupServices>();
            this.miscellaneousServices   = Container.Resolve <IMiscellaneousServices>();
            this.patientServices         = Container.Resolve <IPatientServices>();
            this.patientDocumentServices = Container.Resolve <IPatientDocumentServices>();

            this.patientDocumentIt2Manager = new PatientDocumentIt2Manager(this.lookupServices, this.miscellaneousServices, this.patientServices, this.patientDocumentServices);
            this.documentManager           = new DocumentIt2Manager();

            if (!this.User.Identity.IsAuthenticated)
            {
                return;
            }

            var authorizationTicketHelper = new AuthorizationTicketHelper();

            this.practiceLocationId = authorizationTicketHelper.GetPracticeLocationId();
        }
 public ResourceRequestsController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IEmployeeServices employeeServices, IUserService userService) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _employeeServices = employeeServices;
     _userService      = userService;
 }
Пример #17
0
 public AttendanceController(HrmsDbContext context, ILookupServices lookup)
 {
     _context = context;
     _lookup  = lookup;
 }
Пример #18
0
 public TenantController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, ITenantsServices tenantServices)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _tenantServices = tenantServices;
 }
Пример #19
0
 public ReceiveGoodsController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
 }
Пример #20
0
 public ProductAttributesController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IProductServices productServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _productServices = productServices;
 }
 public GroupsController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IGroupsServices groupServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _groupsServices = groupServices;
 }
 public StockTakesController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IStockTakeApiService stockTakeService, ITenantsServices tenantServices, ITenantLocationServices tenantLocationServices, IProductServices productServices, IGaneConfigurationsHelper configHelper)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     TenantLocationServices = tenantLocationServices;
     _stockTakeService      = stockTakeService;
     _tenantServices        = tenantServices;
     _productServices       = productServices;
     _configHelper          = configHelper;
 }
 public VehicleInspectionController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IVehicleInspectionService inspectionService, IMarketServices marketServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _inspectionService = inspectionService;
     _marketServices = marketServices;
 }
 public JobTypesController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IEmployeeServices employeeServices)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _employeeServices = employeeServices;
 }
Пример #25
0
 public EmailTemplatesController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices,
                                 IEmailNotificationService emailNotificationService, EmailServices emailServices)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _emailNotificationService = emailNotificationService;
     _emailServices            = emailServices;
 }
 public PalletsController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, ITenantsServices tenantsServices, IPalletingService palletingService, IMarketServices marketServices, IEmployeeServices employeeServices, IGaneConfigurationsHelper helper) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _palletingService = palletingService;
     _marketServices   = marketServices;
     _employeeServices = employeeServices;
     _helper           = helper;
     _tenantServices   = tenantsServices;
 }
 public ShiftsController(IShiftsServices shiftsServices, ITenantLocationServices storesServices, ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IEmployeeServices employeeServices)
     : base(orderService, propertyService, accountServices, lookupServices)
 {
     _shiftsServices   = shiftsServices;
     _storesServices   = storesServices;
     _employeeServices = employeeServices;
 }
Пример #28
0
 public EmployeeShiftsController(IEmployeeShiftsServices employeeShiftsServices, ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices, IEmployeeServices employeeServices, ITerminalServices terminalServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
     _employeeShiftsServices = employeeShiftsServices;
     _employeeServices       = employeeServices;
     _terminalServices       = terminalServices;
 }
 public OrderProcessDetailController(ICoreOrderService orderService, IPropertyService propertyService, IAccountServices accountServices, ILookupServices lookupServices) : base(orderService, propertyService, accountServices, lookupServices)
 {
 }
Пример #30
0
 public PayrollsController(HrmsDbContext context, ILookupServices lookup)
 {
     _context = context;
     _lookup  = lookup;
 }