Example #1
0
        static ValuesController()
        {
            // устанавливает использование CostService в качестве объекта ICostService
            //
            IKernel ninjectKernel = new StandardKernel();

            ninjectKernel.Bind <ICostService>().To <CostService>();
            CostService = ninjectKernel.Get <ICostService>();
        }
Example #2
0
 public OrderController(IOrderService orderService,
                        ICarsService carService,
                        IEmployeeService employeeService,
                        ICostService costService)
 {
     _orderService    = orderService;
     _carService      = carService;
     _employeeService = employeeService;
     _costService     = costService;
 }
Example #3
0
 public CostController(
     ILogger <PersonController> logger,
     IMapper mapper,
     ICostService costService,
     IContentService contentService)
 {
     this.logger         = logger;
     this.mapper         = mapper;
     this.costService    = costService;
     this.contentService = contentService;
 }
Example #4
0
 public Cost VName(Cost cost, ICostService _costService)
 {
     if (String.IsNullOrEmpty(cost.Name) || cost.Name.Trim() == "")
     {
         cost.Errors.Add("Name", "Tidak boleh kosong");
     }
     else if (_costService.IsNameDuplicated(cost))
     {
         cost.Errors.Add("Name", "Tidak boleh diduplikasi");
     }
     return(cost);
 }
 public PgPaperpusherNotifier(
     ILogger logger,
     IPgPurchaseOrderService purchaseOrderService,
     IPaperpusherClient paperpusherClient,
     ICostService costService
     )
 {
     _logger = logger;
     _purchaseOrderService = purchaseOrderService;
     _paperpusherClient    = paperpusherClient;
     _costService          = costService;
 }
Example #6
0
 public HomeController(IRouteService routeService, ICostService costService, ITicketService ticketService)
 {
     _routeService  = routeService;
     _costService   = costService;
     _ticketService = ticketService;
     _mapperTrip    = new MapperConfiguration(cfg =>
     {
         cfg.CreateMap <TripSearchDTO, SearchTripViewModel>();
         cfg.CreateMap <TypeCarSeatsDTO, SeatSearchViewModel>();
         cfg.CreateMap <AllrSeatsProcedureDTO, AllSeatsProcedureViewModel>();
     }).CreateMapper();
 }
Example #7
0
        public Cost VObject(Cost cost, ICostService _costService)
        {
            Cost oldcost = _costService.GetObjectById(cost.Id);

            if (oldcost == null)
            {
                cost.Errors.Add("Generic", "Invalid Data For Update");
            }
            else if (!VOffice(cost.OfficeId, oldcost.OfficeId))
            {
                cost.Errors.Add("Generic", "Invalid Data For Update");
            }
            return(cost);
        }
Example #8
0
 public Cost VCreateObject(Cost cost, ICostService _costService)
 {
     VName(cost, _costService);
     if (!isValid(cost))
     {
         return(cost);
     }
     VRemarks(cost);
     if (!isValid(cost))
     {
         return(cost);
     }
     return(cost);
 }
Example #9
0
 public PgCostViewDetails(IMapper mapper,
                          EFContext efContext,
                          IPermissionService permissionService,
                          IEnumerable <Lazy <IStageBuilder, PluginMetadata> > stageBuilders,
                          IRuleService ruleService,
                          IPgPurchaseOrderService purchaseOrderService,
                          ICostTemplateService costTemplateService,
                          ICostService costService)
 {
     _purchaseOrderService = purchaseOrderService;
     _costTemplateService  = costTemplateService;
     _ruleService          = ruleService;
     _mapper            = mapper;
     _efContext         = efContext;
     _permissionService = permissionService;
     _stageBuilders     = stageBuilders;
     _costService       = costService;
 }
 public BudgetFormService(
     EFContext efContext,
     IExcelCellService excelCellService,
     ICostStageRevisionService costStageRevisionService,
     ICostLineItemUpdater costLineItemUpdater,
     ISupportingDocumentsService supportingDocumentsService,
     ICostCurrencyUpdater costCurrencyUpdater,
     IBudgetFormPropertyValidator budgetFormValidator,
     ICostService costService,
     IActivityLogService activityLogService,
     IMapper mapper)
 {
     _efContext                  = efContext;
     _excelCellService           = excelCellService;
     _costStageRevisionService   = costStageRevisionService;
     _costLineItemUpdater        = costLineItemUpdater;
     _supportingDocumentsService = supportingDocumentsService;
     _costCurrencyUpdater        = costCurrencyUpdater;
     _budgetFormValidator        = budgetFormValidator;
     _activityLogService         = activityLogService;
     _mapper = mapper;
 }
Example #11
0
 public CostController(ILogger <CostController> logger, IOptions <AppConfig> appConfig, ICostService costService)
 {
     _logger      = logger;
     _appConfig   = appConfig.Value;
     _costService = costService;
 }
Example #12
0
 public CostServiceTests()
 {
     costService = new CostService();
 }
 public PendingApprovalHandler(ICostService costService)
 {
     _costService = costService;
 }
Example #14
0
 public DeleteCostItemCommandHandler(ICostService costService)
 {
     _costService = costService ?? throw new ArgumentNullException(nameof(costService));
 }
Example #15
0
 public CostController(IOrderService orderService,
                       ICostService costService)
 {
     _orderService = orderService;
     _costService  = costService;
 }
Example #16
0
 public CostController(ICostService costService)
 {
     _costService = costService;
 }
 public CostDetailController(ILogger <CostDetailController> logger, IMapper mapper, ICostService baseService)
     : base(logger, mapper, baseService)
 {
 }
Example #18
0
 public CostFacade(IUnitOfWork unitOfWork, ICostService costService)
 {
     _unitOfWork  = unitOfWork;
     _costService = costService;
 }
 public CreateReportCommandHandler(ICostService costService)
 {
     _costService = costService ?? throw new ArgumentNullException(nameof(costService));
 }
Example #20
0
 public HomeController(ILogger <HomeController> logger, ICostService costService)
 {
     _logger      = logger;
     _costService = costService;
 }
 public GetReportByCapabilityIdentifierCommandHandler(ICostService costService)
 {
     _costService = costService ?? throw new ArgumentNullException(nameof(costService));
 }