Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context">The db context</param>
 /// <param name="officeService">The office service.</param>
 /// <param name="validator">The project business validator.</param>
 /// <param name="saveActions">The context save actions.</param>
 public ProjectService(
     EcaContext context,
     IOfficeService officeService,
     IBusinessValidator <ProjectServiceCreateValidationEntity, ProjectServiceUpdateValidationEntity> validator,
     List <ISaveAction> saveActions = null)
     : base(context, saveActions)
 {
     Contract.Requires(context != null, "The context must not be null.");
     Contract.Requires(validator != null, "The validator must not be null.");
     this.validator             = validator;
     this.officeService         = officeService;
     throwIfProjectDoesNotExist = (projectId, project) =>
     {
         if (project == null)
         {
             throw new ModelNotFoundException(String.Format("The project with id [{0}] does not exist.", projectId));
         }
     };
     throwIfParticipantTypeDoesNotExist = (participantType) =>
     {
         if (participantType == null)
         {
             throw new ModelNotFoundException("The participant type does not exist.");
         }
     };
 }
Esempio n. 2
0
 public AuthController(
     UserManager <AppUser> userManager,
     IConfiguration configuration,
     MyIdentityDbContext userDbContext,
     RoleManager <IdentityRole> roleManager,
     IPrivateCustomerService privateContext,
     ICitizenshipService citizenshipContext,
     ICityService cityContext,
     IOfficeService officeContext,
     IBalanceService balanceContext,
     IBusinessCustomerService businessContext,
     IJwtAuthManager jwtAuthManager
     )
 {
     _userManager        = userManager;
     _configuration      = configuration;
     _privateContext     = privateContext;
     _userDbContext      = userDbContext;
     _roleManager        = roleManager;
     _citizenshipContext = citizenshipContext;
     _cityContext        = cityContext;
     _officeContext      = officeContext;
     _balanceContext     = balanceContext;
     _businessContext    = businessContext;
     _jwtAuthManager     = jwtAuthManager;
 }
Esempio n. 3
0
 public OfficeController(IOfficeService OfficeService,
                         ILog <OfficeController> logger,
                         IMapper mapper) : base(logger)
 {
     _OfficeService = OfficeService;
     _mapper        = mapper;
 }
 public SalesController()
 {
     var dbfactory = new DatabaseFactory();
     var unitOfWork = new UnitOfWork(dbfactory);
     _salesOrderService = new SalesOrderService(new SalesOrderRepository(dbfactory),
         new SalesOrderDetailRepository(dbfactory),
         new SalesOrderApprovalRepository(dbfactory),
         new NotificationRepository(dbfactory),
         new NotificationDetailRepository(dbfactory),
         unitOfWork);
     _approvalController = new ApprovalController<SlsSalesOrderApproval, SlsSalesOrderViewModel>(_salesOrderService);
     _deliveryService = new DeliveryService(new DeliveryRepository(dbfactory), new DeliveryDetailRepository(dbfactory), unitOfWork);
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), unitOfWork);
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), unitOfWork);
     _officeService = new OfficeService(new OfficeRepository(dbfactory), unitOfWork);
     _DistributorService = new DistributorService(new DistributorRepository(dbfactory), unitOfWork);
     _DealerService = new DealerService(new DealerRepository(dbfactory), unitOfWork);
     _CorporateClientService = new CorporateClientService(new CorporateClientRepository(dbfactory), unitOfWork);
     _RetailerService = new RetailerService(new RetailerRepository(dbfactory), unitOfWork);
     _FreeProductService = new FreeProductService(new FreeProductRepository(dbfactory), new ChartOfProductRepository(dbfactory),
         new UnitOfMeasurementRepository(dbfactory), unitOfWork);
     _ProductService = new ChartOfProductService(new ChartOfProductRepository(dbfactory), unitOfWork);
     _UnitService = new UnitOfMeasurementService(new UnitOfMeasurementRepository(dbfactory), unitOfWork);
     _salesDiscountSettingService = new SalesDiscountSettingService(new SalesDiscountSettingRepository(dbfactory), unitOfWork);
     _PartyCreditService = new PartyCreditReportService(new InvStoreOpeningRepository(dbfactory), unitOfWork);
     _promotionalOfferService = new PromotionalOfferService(new PromotionalOfferRepository(dbfactory),
         new PromotionalOfferDetailRepository(dbfactory),
         new UnitOfWork(dbfactory));
 }
 public CollectionController()
 {
     var dbfactory = new DatabaseFactory();
     _collectionEntryService = new CollectionEntryService(new CollectionEntryRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
Esempio n. 6
0
 public ScenarioHelper(IDriverService driverService, ICarService carService, IRentalService rentalService, IOfficeService officeService, StopRentalService finishRentalService)
 {
     _driverService       = driverService;
     _carService          = carService;
     _rentalService       = rentalService;
     _finishRentalService = finishRentalService;
     _officeService       = officeService;
 }
Esempio n. 7
0
 public Office VAbbrevation(Office office, IOfficeService _officeService)
 {
     if (String.IsNullOrEmpty(office.Abbrevation) || office.Abbrevation.Trim() == "")
     {
         office.Errors.Add("Abbrevation", "Tidak boleh kosong");
     }
     return(office);
 }
Esempio n. 8
0
 public OfficeContactController(IOfficeContactService officeContactService,
                                IOfficeService officeService,
                                IConfiguration configuration)
 {
     _officeContactService = officeContactService;
     _officeService        = officeService;
     _configuration        = configuration;
 }
Esempio n. 9
0
 public EmployeesController(
     ICompanyService companyService,
     IEmployeeService employeeService,
     IOfficeService officeService)
 {
     this.companyService  = companyService;
     this.employeeService = employeeService;
     this.officeService   = officeService;
 }
 public FixedAssetController()
 {
     var dbfactory = new DatabaseFactory();
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
     _AnFFixedAssetService = new AnFFixedAssetService(new AnFFixedAssetRepository(dbfactory), new AnFFixedAcquisitionRepository(dbfactory), new AnFFixedAssetRevalueRepository(dbfactory), new UnitOfWork(dbfactory));
     _AnFFixedAssetRevalueService = new AnFFixedAssetRevalueService(new AnFFixedAssetRevalueRepository(dbfactory), new UnitOfWork(dbfactory));
 }
 public SalesTargetController()
 {
     var dbfactory = new DatabaseFactory();
      _SalesTargetService = new SalesTargetService(new SalesTargetRepository(dbfactory), new UnitOfWork(dbfactory));
      _SalesTargetDetailService = new SalesTargetDetailService(new SalesTargetDetailRepository(dbfactory), new UnitOfWork(dbfactory));
      _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
      _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
      _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
 public ExpenseController()
 {
     var dbfactory = new DatabaseFactory();
     _anfExpenseService = new AnFExpenseService(new ERPOptima.Data.Accounts.Repository.AnFExpenseRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
     _ccService = new AnFCostCenterService(new AnFCostCenterRepository(dbfactory), new UnitOfWork(dbfactory)); //Add by Bably
 }
Esempio n. 13
0
 public IssueController()
 {
     var dbfactory = new DatabaseFactory();
      _IssueService = new IssueService(new IssueRepository(dbfactory), new UnitOfWork(dbfactory));
      _IssueDetailService = new IssueDetailService(new IssueDetailRepository(dbfactory), new UnitOfWork(dbfactory));
      _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
      _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
      _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
 public SalesReturnController()
 {
     var dbfactory = new DatabaseFactory();
     _SalesReturnService = new SalesReturnService(new SalesReturnRepository(dbfactory),
         new SalesReturnDetailRepository(dbfactory), new StockInRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
Esempio n. 15
0
 public OfficeApiService(
     IOfficeService officeService,
     IMapper <myOffice, Office> toResourceMapper
     , IMapper <Office, myOffice> toEntityMapper)
 {
     _officeService    = officeService;
     _toResourceMapper = toResourceMapper;
     _toEntityMapper   = toEntityMapper;
 }
 public DefectEntryController()
 {
     var dbfactory = new DatabaseFactory();
        _IDefectEntryService = new DefectEntryService(new DefectEntryRepository(dbfactory), new UnitOfWork(dbfactory));
     _IDefectDetailService = new DefectDetailEntryService(new DefectDetailEntryRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
        private ISecCompanyService _SecCompanyService; //Add by Bably

        #endregion Fields

        #region Constructors

        public AdvanceController()
        {
            var dbfactory = new DatabaseFactory();
            _advanceListService = new AnfAdvancetListService(new AnfAdvancetListepository(dbfactory),new UnitOfWork(dbfactory));
            _advancetAdjustmentService = new AnfAdvancetAdjustmentService(new AnfAdvanceAdjustmentRepository(dbfactory), new UnitOfWork(dbfactory));
            _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
            _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
            _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
        }
Esempio n. 18
0
 public OfficeImportService(IOfficeService officeService, IUserService userService, IImportFileService importFileService,
                            ICountryService countryService, IStateService stateService, IExportCSVService exportCsvService)
 {
     _importFileService = importFileService;
     _officeService     = officeService;
     _userService       = userService;
     _exportCsvService  = exportCsvService;
     _countryService    = countryService;
     _stateService      = stateService;
 }
 public FieldVisitController()
 {
     var dbfactory = new DatabaseFactory();
     _fieldVisitListService = new FieldVisitListService(new FieldVisitListRepository(dbfactory), new UnitOfWork(dbfactory));
     _fieldVisitService = new FieldVisitService(new FieldVisitRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecUserService = new SecUserService(new ERPOptima.Data.Security.Repository.SecUserRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
Esempio n. 20
0
 public OfficeController(IOfficeService service,
                         ICompanyService companyService,
                         ICountryService countryService,
                         ICityService cityService)
 {
     this.service        = service;
     this.countryService = countryService;
     this.cityService    = cityService;
     this.companyService = companyService;
 }
 public TransferController()
 {
     var dbfactory = new DatabaseFactory();
      _TransferService = new TransferService(new TransferRepository(dbfactory), new UnitOfWork(dbfactory));
      _TransferDetailService = new TransferDetailService(new TransferDetailRepository(dbfactory), new UnitOfWork(dbfactory));
      _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
      _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
      _StoreService = new StoreService(new InvStoreRepository(dbfactory), new UnitOfWork(dbfactory));
      _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
Esempio n. 22
0
 public MappingProjectController(
     IMappingProjectService mappingProjectService,
     IMunicipalityService municipalityService,
     IOfficeService offices,
     KosContext kosContext)
 {
     _mappingProjectService = mappingProjectService;
     _municipalityService   = municipalityService;
     _offices   = offices;
     _dbContext = kosContext;
 }
 public UserController(MyIdentityDbContext user, IHttpContextAccessor contextAccessor, IOfficeService officeContext, IWebHostEnvironment env, ICityService cityContext, UserManager <AppUser> userManager, IPrivateCustomerService privateContext, IBusinessCustomerService businesContext)
 {
     _privateContext  = privateContext;
     _user            = user;
     _businesContext  = businesContext;
     _userManager     = userManager;
     _cityContext     = cityContext;
     _officeContext   = officeContext;
     _contextAccessor = contextAccessor;
     _env             = env;
 }
Esempio n. 24
0
 public EmployeeController(IEmployeeService service,
                           ICountryService countryService,
                           ICityService cityService,
                           ICompanyService companyService,
                           IOfficeService officeService)
 {
     this.service        = service;
     this.countryService = countryService;
     this.cityService    = cityService;
     this.companyService = companyService;
     this.officeService  = officeService;
 }
 public DamageRequestController()
 {
     var dbfactory = new DatabaseFactory();
      _IDamageService = new DamageService(new InvDamageRepository(dbfactory),
         new NotificationRepository(dbfactory),
         new NotificationDetailRepository(dbfactory),
         new InvDamageApprovalRepository(dbfactory), new UnitOfWork(dbfactory));
     _IDamageDetailService = new DamageDetailService(new InvDamageDetailRepository(dbfactory), new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
        public SalesReplacementController()
        {
            var dbfactory = new DatabaseFactory();
            _SalesReplacementService = new SalesReplacementService(new SalesReplacementRepository(dbfactory), new UnitOfWork(dbfactory));

            _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
            _SalesReplacementDetailService = new SalesReplacementDetailService(new SalesReplacementDetailRepository(dbfactory), new UnitOfWork(dbfactory));
            _ChartOfProductService = new ChartOfProductService(new ChartOfProductRepository(dbfactory), new UnitOfWork(dbfactory));
            _unitOfMeasurementService = new UnitOfMeasurementService(new UnitOfMeasurementRepository(dbfactory), new UnitOfWork(dbfactory));
            _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
            _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
        }
Esempio n. 27
0
 public Office VName(Office office, IOfficeService _officeService)
 {
     if (String.IsNullOrEmpty(office.Name) || office.Name.Trim() == "")
     {
         office.Errors.Add("Name", "Tidak boleh kosong");
     }
     if (_officeService.IsNameDuplicated(office))
     {
         office.Errors.Add("Name", "Tidak boleh diduplikasi");
     }
     return(office);
 }
 public OfficeDirectoryController(IOfficeService officeService,
                                  ICommonService commonService,
                                  IStateService stateService,
                                  ICountryService countryService,
                                  IConfiguration configuration)
 {
     _officeService  = officeService;
     _commonService  = commonService;
     _countryService = countryService;
     _stateService   = stateService;
     _configuration  = configuration;
 }
Esempio n. 29
0
 /// <summary>
 /// Creates a new ProgramService with the given context to operator against.
 /// </summary>
 /// <param name="officeService">The office service.</param>
 /// <param name="context">The context to operate on.</param>
 /// <param name="saveActions">The save actions.</param>
 /// <param name="programServiceValidator">The program service validator.</param>
 public ProgramService(
     EcaContext context,
     IOfficeService officeService,
     IBusinessValidator <ProgramServiceValidationEntity, ProgramServiceValidationEntity> programServiceValidator,
     List <ISaveAction> saveActions = null)
     : base(context, saveActions)
 {
     Contract.Requires(context != null, "The context must not be null.");
     Contract.Requires(programServiceValidator != null, "The program service validator must not be null.");
     Contract.Requires(officeService != null, "The office service must not be null.");
     this.validator     = programServiceValidator;
     this.officeService = officeService;
 }
 public OfficeServiceServer(
     [FromServices] IRabbitMQPersistentConnection persistentConnection,
     [FromServices] IOfficeService officeService,
     [FromServices] ILogger <OfficeServiceServer> logger,
     [FromServices] IMapper autoMapper)
 {
     this.persistentConnection = persistentConnection;
     this.officeService        = officeService;
     this.logger     = logger;
     this.autoMapper = autoMapper;
     CreateConsumerChannel(RequestQueueName);
     logger.LogInformation($"OfficeService: created a queue called [{RequestQueueName}]");
 }
 public RequisitionController()
 {
     var dbfactory = new DatabaseFactory();
     _RequisitionService = new RequisitionService(new RequisitionRepository(dbfactory),
         new RequisitionApprovalRepository(dbfactory),
         new NotificationRepository(dbfactory), new NotificationDetailRepository(dbfactory),
         new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
     _RequisitionDetailService = new RequisitionDetailService(new RequisitionDetailRepository(dbfactory), new UnitOfWork(dbfactory));
     //approval controller - to control all approvals
     _approvalController = new ApprovalController<InvRequisitionApproval, InvRequisitionViewModel>(_RequisitionService);
 }
Esempio n. 32
0
 public Office VUpdateObject(Office office, IOfficeService _officeService)
 {
     VName(office, _officeService);
     if (!isValid(office))
     {
         return(office);
     }
     VAbbrevation(office, _officeService);
     if (!isValid(office))
     {
         return(office);
     }
     return(office);
 }
Esempio n. 33
0
 /// <summary>
 /// Creates a new controller instance.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="focusCategoryService">The focus category service.</param>
 /// <param name="justificationObjectiveService">The justification objective service.</param>
 /// <param name="authorizationHandler"></param>
 /// <param name="resourceService"></param>
 /// <param name="userProvider"></param>
 public OfficesController(IOfficeService service, IFocusCategoryService focusCategoryService, IJustificationObjectiveService justificationObjectiveService, IResourceService resourceService, IResourceAuthorizationHandler authorizationHandler, IUserProvider userProvider)
 {
     Contract.Requires(service != null, "The office service must not be null.");
     Contract.Requires(focusCategoryService != null, "The focus category service must not be null.");
     Contract.Requires(justificationObjectiveService != null, "The justification service must not be null.");
     Contract.Requires(resourceService != null, "The resource service must not be null.");
     Contract.Requires(authorizationHandler != null, "The authorization handler must not be null.");
     Contract.Requires(userProvider != null, "The authorization handler must not be null.");
     this.service = service;
     this.focusCategoryService          = focusCategoryService;
     this.justificationObjectiveService = justificationObjectiveService;
     this.resourceService      = resourceService;
     this.authorizationHandler = authorizationHandler;
     this.userProvider         = userProvider;
 }
Esempio n. 34
0
 public OfficeController(IOfficeService officeService,
                         IUserService userService,
                         ICommonService commonService,
                         IStateService stateService,
                         ICountryService countryService,
                         IContractsService contractsService,
                         IConfiguration configuration)
 {
     _officeService    = officeService;
     _commonService    = commonService;
     _countryService   = countryService;
     _userService      = userService;
     _stateService     = stateService;
     _contractsService = contractsService;
     _configuration    = configuration;
     _logger           = LogManager.GetCurrentClassLogger();
 }
 public CorporateSalesOrderController()
 {
     var dbfactory = new DatabaseFactory();
     var unitOfWork = new UnitOfWork(dbfactory);
     _salesOrderService = new SalesOrderService(new SalesOrderRepository(dbfactory),
         new SalesOrderDetailRepository(dbfactory),
         new SalesOrderApprovalRepository(dbfactory),
         new NotificationRepository(dbfactory),
         new NotificationDetailRepository(dbfactory),
         unitOfWork);
     _officeService = new OfficeService(new OfficeRepository(dbfactory), unitOfWork);
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), unitOfWork);
     _FreeProductService = new FreeProductService(new FreeProductRepository(dbfactory), new ChartOfProductRepository(dbfactory),
         new UnitOfMeasurementRepository(dbfactory), unitOfWork);
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), unitOfWork);
     _salesDiscountSettingService = new SalesDiscountSettingService(new SalesDiscountSettingRepository(dbfactory), unitOfWork);
     _PartyCreditService = new PartyCreditReportService(new InvStoreOpeningRepository(dbfactory), unitOfWork);
 }
Esempio n. 36
0
 public GridFormService(
     IFapApplicationContext fapApplicationContext,
     ILogger <GridFormService> logger,
     IOfficeService officeService,
     IDbContext dbContext,
     IRbacService rbacService,
     IAntiforgery antiforgery,
     IMemoryCache memoryCache, IMultiLangService multiLangService)
 {
     _dbContext          = dbContext;
     _applicationContext = fapApplicationContext;
     _rbacService        = rbacService;
     _antiforgery        = antiforgery;
     _officeService      = officeService;
     _logger             = logger;
     _memoryCache        = memoryCache;
     _multiLangService   = multiLangService;
 }
 public CorporateSalesController()
 {
     var dbfactory = new DatabaseFactory();
     _service = new CorporateSalesService(new CorporateSalesRepository(dbfactory), new CorporateSalesDetailRepository(dbfactory),
         new CorporateSalesApprovalRepository(dbfactory), new NotificationRepository(dbfactory), new NotificationDetailRepository(dbfactory),
         new UnitOfWork(dbfactory));
     _approvalController = new ApprovalController<SlsCorporateSalesApproval, SlsCorporateSalesApplication>(_service);
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
     _CorporateClientService = new CorporateClientService(new CorporateClientRepository(dbfactory), new UnitOfWork(dbfactory));
     _salesOrderService = new SalesOrderService(new SalesOrderRepository(dbfactory),
         new SalesOrderDetailRepository(dbfactory),
         new SalesOrderApprovalRepository(dbfactory),
         new NotificationRepository(dbfactory),
         new NotificationDetailRepository(dbfactory),
         new UnitOfWork(dbfactory));
 }
 ////
 // GET: /Sales/Delivery/
 public DeliveryController()
 {
     var dbfactory = new DatabaseFactory();
     _DeliveryService = new DeliveryService(new DeliveryRepository(dbfactory), new DeliveryDetailRepository(dbfactory), new SalesOrderDetailRepository(dbfactory),
         new UnitOfWork(dbfactory));
     _DeliveryDetailsService = new DeliveryDetailsService(new DeliveryDetailsRepository(dbfactory), new ChartOfProductRepository(dbfactory),
         new UnitOfMeasurementRepository(dbfactory), new DeliveryRepository(dbfactory), new SalesOrderDetailRepository(dbfactory),
         new UnitOfWork(dbfactory));
     _SecCompanyService = new SecCompanyService(new SecCompanyRepository(dbfactory), new UnitOfWork(dbfactory));
     _salesOrderService = new SalesOrderService(new SalesOrderRepository(dbfactory),
        new SalesOrderDetailRepository(dbfactory),
        new SalesOrderApprovalRepository(dbfactory),
        new NotificationRepository(dbfactory),
        new NotificationDetailRepository(dbfactory),
        new UnitOfWork(dbfactory));
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
     _hrmEmployeeService = new HrmEmployeeService(new HrmEmployeeRepository(dbfactory), new UnitOfWork(dbfactory));
     _objRptInvoiceService = new RptInvoiceService(new DistributorRepository(dbfactory), new UnitOfWork(dbfactory));
     _objChallenReportService = new ChallenReportService(new DistributorRepository(dbfactory), new UnitOfWork(dbfactory));
 }
Esempio n. 39
0
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     RoleManager <IdentityRole <int> > roleManager,
     ITokenBuilder tokenBuilder,
     ISendConfirmationEmailService sendConfirmationEmailService,
     ISendResetPasswordService sendResetPasswordService,
     IRefreshTokenService refreshTokenService,
     IGetUserService getUserService,
     ICreateAdressService createAdressService,
     IOfficeService officeService)
 {
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.tokenBuilder  = tokenBuilder;
     this.sendConfirmationEmailService = sendConfirmationEmailService;
     this.sendResetPasswordService     = sendResetPasswordService;
     this.roleManager         = roleManager;
     this.refreshTokenService = refreshTokenService;
     this.getUserService      = getUserService;
     this.createAdressService = createAdressService;
     this.officeService       = officeService;
 }
 public OfficesController(IOfficeService oc)
 {
     officeContext = oc;
 }
 public OfficeController(IOfficeService officeContext, IOfficeNameTranslateService officeTranslateContext)
 {
     _officeContext          = officeContext;
     _officeTranslateContext = officeTranslateContext;
 }
Esempio n. 42
0
 public OfficeController(IConfiguration configuration, IOfficeService officeService) : base(configuration)
 {
     _officeService = officeService;
 }
 public OfficeController()
 {
     var dbfactory = new DatabaseFactory();
     _officeService = new OfficeService(new OfficeRepository(dbfactory), new UnitOfWork(dbfactory));
 }
 public OfficesController(IOfficeService officeService, IEmployeeService employeeService)
 {
     this.officeService   = officeService;
     this.employeeService = employeeService;
 }
Esempio n. 45
0
 public OfficeController(IOfficeService officeService)
 {
     _officeService = officeService;
 }
Esempio n. 46
0
 public ToManageOfficeController(IOfficeService _officeService)
 {
     officeService = _officeService;
 }
Esempio n. 47
0
 public OfficeController(
     [FromServices] IOfficeService officeService)
 {
     this.officeService = officeService;
 }
Esempio n. 48
0
 public BaseTest()
 {
     OfficeService = new OfficeService(new OfficeRepositoryMocking());
 }
 public HomeController(ILogger <HomeController> logger, ICityService cityService, IOfficeService officeService)
 {
     _logger            = logger;
     this.cityService   = cityService;
     this.officeService = officeService;
 }
Esempio n. 50
0
 public OfficeController()
 {
     OfficeService = new OfficeService(new OfficeRepository());
 }