Example #1
0
 public StaffReportController(
     IBranchRepository _Branch
     , IUserRepository _user
     , IBranchDepartmentRepository branchDepartment
     , IStaffsRepository staff
     , IStaffReportRepository staffReport
     , IQueryHelper _QueryHelper
     , ICustomerRepository _Customer
     , IDayOffRepository dayoff
     , ISymbolTimekeepingRepository symboltimekeeping
     , ITransferWorkRepository _TransferWork
     , ISalaryAdvanceRepository _SalaryAdvance
     , IPaymentRepository payment
     )
 {
     BranchRepository           = _Branch;
     userRepository             = _user;
     branchDepartmentRepository = branchDepartment;
     staffRepository            = staff;
     staffReportRepository      = staffReport;
     customerRepository         = _Customer;
     QueryHelper                 = _QueryHelper;
     dayoffRepository            = dayoff;
     symboltimekeepingRepository = symboltimekeeping;
     TransferWorkRepository      = _TransferWork;
     SalaryAdvanceRepository     = _SalaryAdvance;
     paymentRepository           = payment;
 }
Example #2
0
        public EntriesController(
            IOptionsMonitor <Settings> optionsMonitor,
            IDateTimeService dateTimeService,
            IUnitOfWork unitOfWork,
            IQueryHelper db,
            ViewRenderer viewRenderer)
            : base(
                optionsMonitor,
                dateTimeService,
                unitOfWork,
                db)
        {
            _viewRenderer = viewRenderer;

            const string sql = @"
SELECT
    *
FROM
    Accounts
WHERE
    ID != @AccountID
ORDER BY
    DisplayOrder";

            _accountList = accountID => () => Db.Query(conn => conn.Query <Account>(sql, new { accountID }));
        }
Example #3
0
        //ProjectName _currentProjectName = ProjectName.None;

        void ReadDataFiles(List <FileDetails> files, ProjectName projectName)
        {
            if (ExcelDataValues == null)
            {
                ExcelDataValues = new List <DataValue>();
            }
            else
            {
                ExcelDataValues.Clear();
            }
            var connBuilder = DbFactory.GetDefaultConnection(CurrentProjectName);

            if (connBuilder == null)
            {
                return;
            }

            foreach (var file in files)
            {
                IQueryHelper <List <DataValue> > worker = null;
                if (projectName == ProjectName.DOD)
                {
                    worker = new GetDodDataFromExcel()
                    {
                        fileName          = file.FileName,
                        SelectedProject   = projectName,
                        ageGroupsProvider = new AgegroupsProvider()
                        {
                            DB = new DbHelper(connBuilder)
                        }
                        //locationDetail = processedFilesInfo.LocationDetails,
                        //worksheetName = Constants.INCOUNTRY_ION_EXPENSES
                    };
                }
                else
                {
                    worker = new GetValuesFromReport()
                    {
                        fileName = file.FileName, SelectedProject = projectName
                    };
                }
                worker.progressDisplayHelper = new WaitDialog()
                {
                    WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner
                };

                var intermediateResults = worker.Execute();
                if (intermediateResults == null)
                {
                    //we skip and alert the user of the error
                    continue;
                }

                ExcelDataValues.AddRange(intermediateResults);
            }

            //we update the display
            ShowGridDisplayPort(ExcelDataValues);
            return;
        }
Example #4
0
 public UserService(
     IUnitOfWork unitOfWork,
     IQueryHelper db)
 {
     _unitOfWork = unitOfWork;
     _db         = db;
 }
Example #5
0
 public ConfigsController(
     // IWarehouseRepository _Warehouse
     //, IWarehouseLocationItemRepository _WarehouseLocationItem
     //, IInventoryRepository _Inventory
     //, IProductInvoiceRepository _ProductInvoice
     //, IPurchaseOrderRepository _PurchaseOrder
     //, IProductRepository _Product
     //, IProductOutboundRepository _ProductOutbound
     //, IProductInboundRepository _ProductInbound
     IUserRepository _user
     , IQueryHelper _QueryHelper
     //, ITemplatePrintRepository _templatePrint
     //, ICustomerRepository customer
     , ISettingRepository _Setting
     )
 {
     //WarehouseRepository = _Warehouse;
     //WarehouseLocationItemRepository = _WarehouseLocationItem;
     //InventoryRepository = _Inventory;
     //ProductInvoiceRepository = _ProductInvoice;
     //PurchaseOrderRepository = _PurchaseOrder;
     //ProductRepository = _Product;
     //ProductOutboundRepository = _ProductOutbound;
     //ProductInboundRepository = _ProductInbound;
     userRepository = _user;
     QueryHelper    = _QueryHelper;
     //templatePrintRepository = _templatePrint;
     //customerRepository = customer;
     settingRepository = _Setting;
 }
Example #6
0
 public DIetaryManagementService(IMessageHandler feedbackHandler, IDietaryManagementRepository dietaryManagementRepository, IMessageSerializer messageSerializer, IQueryHelper queryHelper)
 {
     this.FeedbackHandler        = feedbackHandler;
     _dietaryManagmentRepository = dietaryManagementRepository;
     _messageSerializer          = messageSerializer;
     _queryHelper = queryHelper;
 }
Example #7
0
 public BaseDomainService(IPrincipal principal)
 {
     this._principal        = principal;
     this._dataHelper       = this.CreateDataHelper();
     this._validationHelper = this.CreateValidationHelper();
     this._queryHelper      = this.CreateQueryHelper();
 }
Example #8
0
 public DatabaseHelper(IClaimHelper claimHelper, IEventLogger logger, IQueryHelper queryHelper)
 {
     ClaimHelper       = claimHelper;
     Logger            = logger;
     DefaultConnection = AppConfigHelper.Instance.GetDefaultSQlConnection();
     QueryHelper       = queryHelper;
 }
Example #9
0
        internal static IQueryDispatcher CreateServer(IQueryHelper queryHelper)
        {
            var queryDispatcher = Substitute.For <IQueryDispatcher>();

            queryDispatcher.GetQueryHelper(0).Returns(queryHelper);
            queryDispatcher.GetQueryHelper(Arg.Is <RowIdentifier>(r => r.ServerId == 0)).Returns(queryHelper);
            return(queryDispatcher);
        }
Example #10
0
 public PageMenuController(IPageRepository page, IPageMenuRepository pageMenu, ISettingLanguageRepository language
                           , IQueryHelper _QueryHelper)
 {
     _pageRepository     = page;
     _pageMenuRepository = pageMenu;
     _languageRepository = language;
     QueryHelper         = _QueryHelper;
 }
Example #11
0
 public App(ISession session,
            IQueryHelper <Transaction> transactionQueryHelper,
            IQueryHelper <Donator> donatorQueryHelper)
 {
     _session = session;
     _transactionQueryHelper = transactionQueryHelper;
     _donatorQueryHelper     = donatorQueryHelper;
 }
Example #12
0
 public MealService(IMealRepository mealRepository,
                    IMessageHandler feedbackHandler, IMessageSerializer messageSerializer,
                    IQueryHelper queryHelper)
 {
     _mealRepository      = mealRepository;
     this.FeedbackHandler = feedbackHandler;
     _messageSerializer   = messageSerializer;
     _queryHelper         = queryHelper;
 }
Example #13
0
            public BasicClonerTests()
            {
                _cache           = FakeBasicDatabase.CreateDatabaseSchema();
                _queryHelper     = FakeBasicDatabase.CreateData();
                _queryDispatcher = FakeBasicDatabase.CreateServer(_queryHelper);

                _executionPlanBuilder = new ExecutionPlanBuilder(null, _queryDispatcher,
                                                                 (IQueryDispatcher d, Settings s, ref MetadataContainer m) => m = _cache, null);
            }
Example #14
0
 public FoodService(IFoodRepository foodRepository,
                    IMessageHandler feedbackHandler, IMessageSerializer messageSerializer,
                    IQueryHelper queryHelper)
 {
     _foodRepository      = foodRepository;
     this.FeedbackHandler = feedbackHandler;
     _messageSerializer   = messageSerializer;
     _queryHelper         = queryHelper;
 }
Example #15
0
 public BaseRepository(IUnitOfWork unitOfWork, IQueryHelper <T> queryHelper, IDbConnectionHelper dbHelper, ILogger <BaseRepository <T> > logger)
 {
     //Make "GetConnection" only one time
     _connection  = unitOfWork.GetConnection();
     _queryHelper = queryHelper;
     _dbHelper    = dbHelper;
     _logger      = logger;
     _unitOfWork  = unitOfWork;
 }
Example #16
0
 public CustomerDiscountController(
     ICustomerDiscountRepository _CustomerDiscount
     , IUserRepository _user
     , IQueryHelper _QueryHelper
     )
 {
     CustomerDiscountRepository = _CustomerDiscount;
     userRepository             = _user;
     QueryHelper = _QueryHelper;
 }
Example #17
0
 public ProviderSearchService(
     IElasticsearchCustomClient elasticsearchCustomClient,
     IConfigurationSettings applicationSettings,
     IStandardMapping standardMapping,
     IQueryHelper queryHelper)
 {
     _elasticsearchCustomClient = elasticsearchCustomClient;
     _applicationSettings       = applicationSettings;
     _standardMapping           = standardMapping;
     _queryHelper = queryHelper;
 }
 protected MoneyControllerBase(
     IOptionsMonitor <Settings> optionsMonitor,
     IDateTimeService dateTimeService,
     IUnitOfWork unitOfWork,
     IQueryHelper db)
 {
     Cfg             = optionsMonitor.CurrentValue;
     DateTimeService = dateTimeService;
     UnitOfWork      = unitOfWork;
     Db = db;
 }
 public ApprenticeshipSearchServiceV3(
     IElasticsearchCustomClient elasticsearchCustomClient,
     IConfigurationSettings applicationSettings,
     IQueryHelper queryHelper,
     IApprenticeshipSearchResultsMapping resultItemMapper)
 {
     _elasticsearchCustomClient = elasticsearchCustomClient;
     _applicationSettings       = applicationSettings;
     _queryHelper      = queryHelper;
     _resultItemMapper = resultItemMapper;
 }
Example #20
0
 public ResetPasswordModel(
     UserManager <ApplicationUser> userManager,
     IConfiguration config,
     IQueryHelper queryHelper,
     ISessionBasedCaptcha captcha)
 {
     _userManager = userManager;
     _config      = config;
     _queryHelper = queryHelper;
     _captcha     = captcha;
 }
Example #21
0
 public UsersController(
     IOptionsMonitor <Settings> optionsMonitor,
     IDateTimeService dateTimeService,
     IUnitOfWork unitOfWork,
     IQueryHelper db,
     IUserService userService)
     : base(
         optionsMonitor,
         dateTimeService,
         unitOfWork,
         db) =>
Example #22
0
 public AssessmentOrgsRepository(
     IElasticsearchCustomClient elasticsearchCustomClient,
     IConfigurationSettings applicationSettings,
     IAssessmentOrgsMapping assessmentOrgsMapping,
     IQueryHelper queryHelper)
 {
     _elasticsearchCustomClient = elasticsearchCustomClient;
     _applicationSettings       = applicationSettings;
     _assessmentOrgsMapping     = assessmentOrgsMapping;
     _queryHelper = queryHelper;
 }
 public MonthlyBudgetsController(
     IOptionsMonitor <Settings> optionsMonitor,
     IDateTimeService dateTimeService,
     IUnitOfWork unitOfWork,
     IQueryHelper db)
     : base(
         optionsMonitor,
         dateTimeService,
         unitOfWork,
         db)
 {
 }
 public FrameworkRepository(
     IElasticsearchCustomClient elasticsearchCustomClient,
     ILogger <FrameworkRepository> applicationLogger,
     IConfigurationSettings applicationSettings,
     IFrameworkMapping frameworkMapping,
     IQueryHelper queryHelper)
 {
     _elasticsearchCustomClient = elasticsearchCustomClient;
     _applicationLogger         = applicationLogger;
     _applicationSettings       = applicationSettings;
     _frameworkMapping          = frameworkMapping;
     _queryHelper = queryHelper;
 }
Example #25
0
 public StandardRepository(
     IElasticsearchCustomClient elasticsearchCustomClient,
     IConfigurationSettings applicationSettings,
     IStandardMapping standardMapping,
     IQueryHelper queryHelper, 
     IGetIfaStandardsUrlService getIfaStandardUrlService)
 {
     _elasticsearchCustomClient = elasticsearchCustomClient;
     _applicationSettings = applicationSettings;
     _standardMapping = standardMapping;
     _queryHelper = queryHelper;
     _getIfaStandardUrlService = getIfaStandardUrlService;
 }
Example #26
0
 public ApprenticeshipSearchServiceV1(
     IElasticsearchCustomClient elasticsearchCustomClient,
     IConfigurationSettings applicationSettings,
     IStandardMapping standardMapping,
     IApprenticeshipSearchResultDocumentMapping resultDocumentMapping,
     IQueryHelper queryHelper)
 {
     _elasticsearchCustomClient = elasticsearchCustomClient;
     _applicationSettings       = applicationSettings;
     _standardMapping           = standardMapping;
     _resultDocumentMapping     = resultDocumentMapping;
     _queryHelper = queryHelper;
 }
Example #27
0
 public PatientService(IPatientRepository patientRepository, IFoodRepository foodRepository,
                       IAccountRepository accountRepository, IDietaryManagementRepository dietaryManagementRepository,
                       IMessageHandler feedbackHandler, IMessageSerializer messageSerializer,
                       IQueryHelper queryHelper, IAuthorization authorizationService)
 {
     _patientRepository                = patientRepository;
     this._foodRepository              = foodRepository;
     this._accountRepository           = accountRepository;
     this._dietaryManagementRepository = dietaryManagementRepository;
     this.FeedbackHandler              = feedbackHandler;
     _messageSerializer                = messageSerializer;
     _queryHelper = queryHelper;
     this._authorizationService = authorizationService;
 }
Example #28
0
        public static void BuildDataFromTable(IQueryHelper queryHelper, IDbTransaction transaction, Int16 serverId, string database, string schema, TableMetadata table, object[] dataRow)
        {
            if (table.ColumnsDefinition.Count != dataRow.Length)
            {
                throw new ArgumentException($"The number of columns defined in the cached table {table.Name} '{table.ColumnsDefinition.Count}' " +
                                            "is different from the current row '{dataRow.Length}'.");
            }

            for (var i = 0; i < table.ColumnsDefinition.Count; i++)
            {
                var col = table.ColumnsDefinition[i];
                dataRow[i] = BuildDataColumn(queryHelper, transaction, serverId, database, schema, table, col);
            }
        }
 public UserAccountController(
     ILogger <UserAccountController> logger,
     IQueryHelper queryHelper,
     UserManager <ApplicationUser> userManager,
     IPaymentHelper paymentHelper,
     ILocalDataHelper localDataHelper,
     ApplicationDbContext db)
 {
     _logger          = logger;
     _queryHelper     = queryHelper;
     _userManager     = userManager;
     _paymentHelper   = paymentHelper;
     _localDataHelper = localDataHelper;
     _db = db;
 }
Example #30
0
 public CrmReportController(
     ILogServiceRemminderRepository logserviceReminder
     , IUserRepository _user
     , ITaskRepository task
     , IQueryHelper _QueryHelper
     , ICustomerRepository _Customer
     , ICategoryRepository category
     )
 {
     logServiceReminderRepository = logserviceReminder;
     customerRepository           = _Customer;
     QueryHelper         = _QueryHelper;
     userRepository      = _user;
     taskRepository      = task;
     _categoryRepository = category;
 }