Exemple #1
0
        public AteQualityModule(
            IFacadeService <AteFaultCode, string, AteFaultCodeResource, AteFaultCodeResource> ateFaultCodeService,
            IFacadeService <AteTest, int, AteTestResource, AteTestResource> ateTestService,
            IFacadeService <AteTestDetail, AteTestDetailKey, AteTestDetailResource, AteTestDetailResource> ateTestDetailService,
            IAteReportsFacadeService ateReportsFacadeService,
            ICountComponentsFacadeService countComponentsService)
        {
            this.ateFaultCodeService     = ateFaultCodeService;
            this.ateTestService          = ateTestService;
            this.ateTestDetailService    = ateTestDetailService;
            this.ateReportsFacadeService = ateReportsFacadeService;
            this.countComponentsService  = countComponentsService;
            this.Get("/production/quality/ate/fault-codes/{faultCode*}", parameters => this.GetFaultCodeById(parameters.faultCode));
            this.Get("/production/quality/ate/fault-codes/", _ => this.GetAllFaultCodes());
            this.Put("/production/quality/ate/fault-codes/{faultCode*}", parameters => this.UpdateFaultCode(parameters.faultCode));
            this.Post("/production/quality/ate/fault-codes", _ => this.AddFaultCode());

            this.Get("/production/quality/ate-tests/count-components/{partNumber*}", parameters => this.CountComponents(parameters.partNumber));
            this.Get("/production/quality/ate-tests/create", _ => this.GetApp());
            this.Get("/production/quality/ate-tests/{id}", parameters => this.GetTestById(parameters.id));
            this.Get("/production/quality/ate-tests", _ => this.SearchAteTests());
            this.Put("/production/quality/ate-tests/{id}", parameters => this.UpdateAteTest(parameters.id));
            this.Post("/production/quality/ate-tests", _ => this.AddAteTest());

            this.Get("/production/reports/ate/status", _ => this.GetApp());
            this.Get("/production/reports/ate/status/report", _ => this.GetStatusReport());
            this.Get("/production/reports/ate/details", _ => this.GetApp());
            this.Get("/production/reports/ate/details/report", _ => this.GetDetailsReport());
        }
Exemple #2
0
        public void EstablishContext()
        {
            this.SalesPackageService = Substitute.For <IFacadeService <SalesPackage, int, SalesPackageResource, SalesPackageResource> >();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.SalesPackageService);
                with.Dependency <IResourceBuilder <SalesPackage> >(new SalesPackageResourceBuilder());
                with.Dependency <IResourceBuilder <IEnumerable <SalesPackage> > >(new SalesPackagesResourceBuilder());
                with.Dependency <IResourceBuilder <IPagedList <SalesPackage> > >(
                    new SalesPackagesPaginatedResourceBuilder());
                with.Module <SalesPackageModule>();
                with.ResponseProcessor <SalesPackageResponseProcessor>();
                with.ResponseProcessor <SalesPackagesResponseProcessor>();
                with.ResponseProcessor <SalesPackagesPaginatedResponseProcessor>();
                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };

                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.Browser = new Browser(bootstrapper);
        }
Exemple #3
0
        public void EstablishContext()
        {
            this.CartonReportsService = Substitute.For <ICartonReportsService>();
            this.CartonTypeService    = Substitute.For <IFacadeService <CartonType, string, CartonTypeResource, CartonTypeUpdateResource> >();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.CartonReportsService);
                with.Dependency(this.CartonTypeService);
                with.Dependency <IResourceBuilder <ResultsModel> >(new ResultsModelResourceBuilder());
                with.Dependency <IResourceBuilder <CartonType> >(new CartonTypeResourceBuilder());
                with.Module <CartonsModule>();
                with.ResponseProcessor <ResultsModelJsonResponseProcessor>();
                with.ResponseProcessor <CartonTypeResponseProcessor>();
                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };

                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.Browser = new Browser(bootstrapper);
        }
Exemple #4
0
        public ImportBooksModule(
            IFacadeService <ImportBook, int, ImportBookResource, ImportBookResource> importBookFacadeService,
            IImportBookExchangeRateService importBookExchangeRateService,
            IFacadeService <ImportBookTransportCode, int, ImportBookTransportCodeResource, ImportBookTransportCodeResource> importBookTransportCodeService,
            IFacadeService <ImportBookTransactionCode, int, ImportBookTransactionCodeResource, ImportBookTransactionCodeResource> importBookTransactionCodeFacadeService,
            IFacadeService <ImportBookCpcNumber, int, ImportBookCpcNumberResource, ImportBookCpcNumberResource> importBookCpcNumberFacadeService,
            IFacadeService <ImportBookDeliveryTerm, string, ImportBookDeliveryTermResource, ImportBookDeliveryTermResource> importBookDeliveryTermFacadeService,
            IFacadeService <Port, string, PortResource, PortResource> portFacadeService)
        {
            this.importBookFacadeService                = importBookFacadeService;
            this.importBookExchangeRateService          = importBookExchangeRateService;
            this.importBookTransportCodeService         = importBookTransportCodeService;
            this.importBookTransactionCodeFacadeService = importBookTransactionCodeFacadeService;
            this.importBookCpcNumberFacadeService       = importBookCpcNumberFacadeService;
            this.importBookDeliveryTermFacadeService    = importBookDeliveryTermFacadeService;
            this.portFacadeService = portFacadeService;

            this.Get("/logistics/import-books/create", _ => this.Negotiate.WithModel(ApplicationSettings.Get()).WithView("Index"));
            this.Get("/logistics/import-books/{id}", parameters => this.GetImportBook(parameters.id));
            this.Put("/logistics/import-books/{id}", parameters => this.UpdateImportBook(parameters.id));
            this.Post("/logistics/import-books", _ => this.CreateImportBook());
            this.Get("/logistics/import-books", parameters => this.GetImportBooks());
            this.Get("/logistics/import-books/exchange-rates", parameters => this.GetExchangeRates());
            this.Get("/logistics/import-books/transport-codes", parameters => this.GetTransportCodes());
            this.Get("/logistics/import-books/transaction-codes", parameters => this.GetTransactionCodes());
            this.Get("/logistics/import-books/cpc-numbers", parameters => this.GetCpcNumbers());
            this.Get("/logistics/import-books/ports", parameters => this.GetPorts());
            this.Get("/logistics/import-books/delivery-terms", parameters => this.GetDeliveryTerms());
        }
Exemple #5
0
        public void EstablishContext()
        {
            this.LabelService              = Substitute.For <ILabelService>();
            this.AuthorisationService      = Substitute.For <IAuthorisationService>();
            this.LabelReprintFacadeService = Substitute.For <IFacadeService <LabelReprint, int, LabelReprintResource, LabelReprintResource> >();
            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.LabelService);
                with.Dependency(this.AuthorisationService);
                with.Dependency(this.LabelReprintFacadeService);
                with.Dependency <IResourceBuilder <Error> >(new ErrorResourceBuilder());
                with.Dependency <IResourceBuilder <ResponseModel <LabelReprint> > >(new LabelReprintResourceBuilder(this.AuthorisationService));
                with.Module <LabelsModule>();
                with.ResponseProcessor <ErrorResponseProcessor>();
                with.ResponseProcessor <LabelReprintResponseProcessor>();
                with.ResponseProcessor <LabelReprintStateResponseProcessor>();
                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };
                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.AuthorisationService.HasPermissionFor(AuthorisedAction.SerialNumberReissueRebuild, Arg.Any <IEnumerable <string> >())
            .Returns(true);
            this.Browser = new Browser(bootstrapper);
        }
Exemple #6
0
        public BuildPlansModule(
            IFacadeService <BuildPlan, string, BuildPlanResource, BuildPlanResource> buildPlanService,
            IBuildPlansReportFacadeService buildPlansReportService,
            IBuildPlanRulesFacadeService buildPlanRulesService,
            IBuildPlanDetailsService buildPlanDetailsService,
            IAuthorisationService authorisationService)
        {
            this.buildPlanService        = buildPlanService;
            this.buildPlansReportService = buildPlansReportService;
            this.buildPlanRulesService   = buildPlanRulesService;
            this.buildPlanDetailsService = buildPlanDetailsService;
            this.authorisationService    = authorisationService;

            this.Get("/production/maintenance/build-plans", _ => this.GetBuildPlans());
            this.Post("/production/maintenance/build-plans", _ => this.AddBuildPlan());
            this.Put("/production/maintenance/build-plans", _ => this.UpdateBuildPlan());
            this.Get("/production/reports/build-plans", _ => this.GetBuildPlanReportOptions());
            this.Get("/production/reports/build-plans/report", _ => this.GetBuildPlanReport());
            this.Get("/production/maintenance/build-plan-rules", _ => this.GetBuildPlanRules());
            this.Get("/production/maintenance/build-plan-rules/{ruleCode}", parameters => this.GetBuildPlanRule(parameters.ruleCode));
            this.Get("/production/maintenance/build-plan-details", _ => this.GetBuildPlanDetails());
            this.Post("/production/maintenance/build-plan-details", _ => this.AddBuildPlanDetail());
            this.Put("/production/maintenance/build-plan-details", _ => this.UpdateBuildPlanDetail());
            this.Delete("/production/maintenance/build-plan-details", _ => this.DeleteBuildPlanDetail());
        }
Exemple #7
0
        public SalesArticleModule(
            IFacadeService <SalesArticle, string, SalesArticleResource, SalesArticleResource> salesArticleService,
            ISalesArticleCompositeDiscountFacadeService salesArticleCompositeDiscountFacadeService,
            ISalesArticleService salesArticleProxyService,
            ISalesArticleSerialNumberFacadeService salesArticleSerialNumberFacadeService)
        {
            this.salesArticleService = salesArticleService;
            this.salesArticleCompositeDiscountFacadeService = salesArticleCompositeDiscountFacadeService;
            this.salesArticleProxyService = salesArticleProxyService;
            this.salesArticleSerialNumberFacadeService = salesArticleSerialNumberFacadeService;


            this.Get("/products/maint/sales-articles", _ => this.GetSalesArticles());
            this.Get("/products/maint/sales-articles/{id*}", parameters => this.GetSalesArticle(parameters.id));
            this.Put("/products/maint/sales-articles/{id*}", parameters => this.UpdateSalesArticle(parameters.id));

            this.Get(
                "/products/maint/sales-articles/composite-discounts/{id*}",
                parameters => this.GetSalesArticleCompositeDiscount(parameters.id));
            this.Put(
                "/products/maint/sales-articles/composite-discounts/{id*}",
                parameters => this.UpdateSalesArticleCompositeDiscount(parameters.id));

            this.Get(
                "/products/maint/sales-articles/serial-number-details/{id*}",
                parameters => this.GetSerialNumberDetails(parameters.id));
        }
Exemple #8
0
        public void EstablishContext()
        {
            this.TqmsReportsFacadeService = Substitute.For <ITqmsReportsFacadeService>();
            this.TqmsMasterFacadeService  = Substitute.For <ISingleRecordFacadeService <TqmsMaster, TqmsMasterResource> >();
            this.TqmsJobRefFacadeService  = Substitute.For <IFacadeService <TqmsJobRef, string, TqmsJobRefResource, TqmsJobRefResource> >();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.TqmsReportsFacadeService);
                with.Dependency(this.TqmsMasterFacadeService);
                with.Dependency(this.TqmsJobRefFacadeService);
                with.Dependency <IResourceBuilder <IEnumerable <ResultsModel> > >(new ResultsModelsResourceBuilder());
                with.Dependency <IResourceBuilder <TqmsMaster> >(new TqmsMasterResourceBuilder());
                with.Dependency <IResourceBuilder <IEnumerable <TqmsJobRef> > >(new TqmsJobRefsResourceBuilder());
                with.Module <TqmsModule>();
                with.ResponseProcessor <ResultsModelsJsonResponseProcessor>();
                with.ResponseProcessor <TqmsMasterResponseProcessor>();
                with.ResponseProcessor <TqmsJobRefsResponseProcessor>();
                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };
                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.Browser = new Browser(bootstrapper);
        }
Exemple #9
0
        public WorksOrdersModule(
            IOutstandingWorksOrdersReportFacade outstandingWorksOrdersReportFacade,
            IFacadeService <WorksOrderLabel, WorksOrderLabelKey, WorksOrderLabelResource, WorksOrderLabelResource> labelService,
            IWorksOrdersService worksOrdersService,
            IWorksOrderLabelPack worksOrderLabelPack)
        {
            this.worksOrdersService  = worksOrdersService;
            this.worksOrderLabelPack = worksOrderLabelPack;
            this.labelService        = labelService;
            this.outstandingWorksOrdersReportFacade = outstandingWorksOrdersReportFacade;

            this.Get("/production/works-orders", _ => this.GetWorksOrders());
            this.Put("/production/works-orders/labels/{seq}/{part*}", _ => this.UpdateWorksOrderLabel());
            this.Post("production/works-orders/labels", _ => this.AddWorksOrderLabel());
            this.Get("/production/works-orders/labels", _ => this.GetWorksOrderLabelsForPart());
            this.Get("/production/works-orders/batch-notes", _ => this.GetWorksOrderBatchNotes());
            this.Get("/production/works-orders/labels/{seq}/{part*}", parameters => this.GetWorksOrderLabel(parameters.part, parameters.seq));
            this.Get("/production/works-orders/{orderNumber}", parameters => this.GetWorksOrder(parameters.orderNumber));
            this.Post("/production/works-orders", _ => this.AddWorksOrder());
            this.Put("/production/works-orders/{orderNumber}", _ => this.UpdateWorksOrder());

            this.Post("/production/works-orders/print-labels", _ => this.PrintWorksOrderLabels());
            this.Post("/production/works-orders/print-aio-labels", _ => this.PrintWorksOrderAioLabels());

            this.Get(
                "/production/works-orders/get-part-details/{partNumber*}",
                parameters => this.GetWorksOrderPartDetails(parameters.partNumber));

            this.Get("/production/works-orders/outstanding-works-orders-report", _ => this.GetOutstandingWorksOrdersReport());
            this.Get("/production/works-orders/outstanding-works-orders-report/export", _ => this.GetOutstandingWorksOrdersReportExport());
            this.Get("/production/works-orders-for-part", _ => this.GetWorksOrdersForPart());
        }
Exemple #10
0
        public void EstablishContext()
        {
            this.RequisitionActionsFacadeService = Substitute.For <IRequisitionActionsFacadeService>();
            this.RequisitionFacadeService        = Substitute
                                                   .For <IFacadeService <RequisitionHeader, int, RequisitionResource, RequisitionResource> >();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
            {
                with.Dependency(this.RequisitionActionsFacadeService);
                with.Dependency(this.RequisitionFacadeService);
                with.Dependency <IResourceBuilder <RequisitionActionResult> >(new RequisitionActionResourceBuilder());
                with.Dependency <IRequisitionMovesResourceBuilder>(new RequisitionMovesResourceBuilder());
                with.Dependency <IResourceBuilder <RequisitionHeader> >(new RequisitionResourceBuilder());
                with.Module <RequisitionModule>();
                with.ResponseProcessor <RequisitionActionResponseProcessor>();
                with.ResponseProcessor <RequisitionResponseProcessor>();
                with.ResponseProcessor <RequisitionMovesResponseProcessor>();
                with.RequestStartup(
                    (container, pipelines, context) =>
                {
                    var claims = new List <Claim>
                    {
                        new Claim(ClaimTypes.Role, "employee"),
                        new Claim(ClaimTypes.NameIdentifier, "test-user")
                    };
                    var user = new ClaimsIdentity(claims, "jwt");

                    context.CurrentUser = new ClaimsPrincipal(user);
                });
            });

            this.Browser = new Browser(bootstrapper);
        }
Exemple #11
0
        public PcasRevisionsModule(
            IFacadeService <PcasRevision, string, PcasRevisionResource, PcasRevisionResource> pcasRevisionsService)
        {
            this.pcasRevisionsService = pcasRevisionsService;

            this.Get("production/maintenance/pcas-revisions", _ => this.GetPcasRevisions());
        }
Exemple #12
0
 public PartsModule(
     IFacadeService <Part, string, PartResource, PartResource> partsFacadeService)
 {
     this.partsFacadeService = partsFacadeService;
     this.Get("/production/maintenance/parts", _ => this.GetParts());
     this.Get("/production/maintenance/parts/{id}", parameters => this.GetPartById(parameters.id));
 }
Exemple #13
0
        public EmployeesModule(
            IFacadeService <Employee, int, EmployeeResource, EmployeeResource> productionTriggerLevelsService)
        {
            this.employeeService = productionTriggerLevelsService;

            this.Get("production/maintenance/employees", _ => this.GetEmployees());
        }
Exemple #14
0
        public PartFailsModule(
            IFacadeService <PartFail, int, PartFailResource, PartFailResource> partFailService,
            IFacadeService <PartFailFaultCode, string, PartFailFaultCodeResource, PartFailFaultCodeResource> faultCodeService,
            IFacadeService <PartFailErrorType, string, PartFailErrorTypeResource, PartFailErrorTypeResource> errorTypeService,
            IPartsReportFacadeService partsReportFacadeService,
            IPartFailSupplierService partFailSupplierService)
        {
            this.partFailService          = partFailService;
            this.errorTypeService         = errorTypeService;
            this.partsReportFacadeService = partsReportFacadeService;
            this.partFailSupplierService  = partFailSupplierService;
            this.faultCodeService         = faultCodeService;

            this.Post("/production/quality/part-fails", _ => this.Add());
            this.Get("/production/quality/part-fails", _ => this.Search());
            this.Get("/production/quality/part-fails/create", _ => this.GetApp());
            this.Get("/production/quality/part-fails/{id}", parameters => this.GetById(parameters.id));

            this.Put("/production/quality/part-fails/{id}", parameters => this.Update(parameters.id));

            this.Get("/production/quality/part-fail-error-types", _ => this.GetErrorTypes());
            this.Get("/production/quality/part-fail-error-types/{type*}", parameters => this.GetErrorType(parameters.type));
            this.Put("/production/quality/part-fail-error-types/{type*}", parameters => this.UpdateErrorType(parameters.type));
            this.Post("/production/quality/part-fail-error-types", parameters => this.AddErrorType());

            this.Get("/production/quality/part-fail-fault-codes", _ => this.GetFaultCodes());
            this.Get("/production/quality/part-fail-fault-codes/{code*}", parameters => this.GetFaultCode(parameters.code));
            this.Put("/production/quality/part-fail-fault-codes/{code*}", parameters => this.UpdateFaultCode(parameters.code));
            this.Post("/production/quality/part-fail-fault-codes", parameters => this.AddFaultCode());

            this.Get("/production/quality/part-fails/detail-report/report", _ => this.GetPartFailDetailsReport());
            this.Get("/production/quality/part-fails/detail-report", _ => this.GetPartFailsDetailReportOptions());

            this.Get("/production/quality/part-fails/suppliers", _ => this.GetPartFailSuppliers());
        }
Exemple #15
0
        public RootProductModule(
            IFacadeService <RootProduct, string, RootProductResource, RootProductResource> rootProductService)
        {
            this.rootProductService = rootProductService;

            this.Get("/products/maint/root-products", _ => this.GetRootProducts());
            this.Get("/products/maint/root-products/{name*}", parameters => this.GetRootProduct(parameters.name));
        }
 public SernosSequenceModule(IFacadeService <SernosSequence, string, SernosSequenceResource, SernosSequenceResource> sernosSequenceService)
 {
     this.sernosSequenceService = sernosSequenceService;
     this.Get("/products/maint/sernos-sequences/{sequenceName*}", parameters => this.GetSernosSequenceBySequenceName(parameters.sequenceName));
     this.Get("/products/maint/sernos-sequences/", _ => this.GetSernosSequences());
     this.Put("/products/maint/sernos-sequences/{sequenceName*}", parameters => this.UpdateSernosSequence(parameters.sequenceName));
     this.Post("/products/maint/sernos-sequences", _ => this.AddSernosSequence());
 }
Exemple #17
0
 public SaCoreTypesModule(IFacadeService <SaCoreType, int, SaCoreTypeResource, SaCoreTypeResource> saCoreTypeService)
 {
     this.saCoreTypeService = saCoreTypeService;
     this.Get("/products/maint/sa-core-types", _ => this.GetSaCoreTypes());
     this.Get("/products/maint/sa-core-types/{coreType}", parameters => this.GetSaCoreType(parameters.coreType));
     this.Put("/products/maint/sa-core-types/{coreType}", parameters => this.UpdateSaCoreType(parameters.coreType));
     this.Post("/products/maint/sa-core-types", _ => this.AddSaCoreType());
 }
 public ManufacturingSkillsModule(IFacadeService <ManufacturingSkill, string, ManufacturingSkillResource, ManufacturingSkillResource> manufacturingSkillService)
 {
     this.manufacturingSkillService = manufacturingSkillService;
     this.Get("/production/resources/manufacturing-skills", _ => this.GetAll());
     this.Get("/production/resources/manufacturing-skills/{skillCode*}", parameters => this.GetById(parameters.skillCode));
     this.Put("/production/resources/manufacturing-skills/{skillCode*}", parameters => this.UpdateManufacturingSkill(parameters.skillCode));
     this.Post("/production/resources/manufacturing-skills", parameters => this.AddManufacturingSkill());
 }
Exemple #19
0
 public LabelTypeModule(IFacadeService <LabelType, string, LabelTypeResource, LabelTypeResource> labelTypeService)
 {
     this.labelTypeService = labelTypeService;
     this.Get("/production/resources/label-types", _ => this.GetAll());
     this.Get("/production/resources/label-types/{labelTypeCode*}", parameters => this.GetById(parameters.labelTypeCode));
     this.Put("/production/resources/label-types/{labelTypeCode*}", parameters => this.UpdateLabelType(parameters.labelTypeCode));
     this.Post("/production/resources/label-types", parameters => this.AddLabelType());
 }
Exemple #20
0
 public void SetUpContext()
 {
     this.SerialNumberRepository = Substitute.For <IRepository <SerialNumber, int> >();
     this.TransactionManager     = Substitute.For <ITransactionManager>();
     this.SerialNumberFactory    = Substitute.For <ISerialNumberFactory>();
     this.SernosNoteService      =
         Substitute.For <IFacadeService <SernosNote, int, SernosNoteCreateResource, SernosNoteResource> >();
     this.Sut = new SerialNumberService(this.SerialNumberRepository, this.TransactionManager, this.SerialNumberFactory, this.SernosNoteService);
 }
Exemple #21
0
 public PartCadInfoModule(
     IFacadeService <Part, string, PartResource, PartResource> partsFacadeService,
     IAuthorisationService authorisationService)
 {
     this.partsFacadeService   = partsFacadeService;
     this.authorisationService = authorisationService;
     this.Get("/production/maintenance/part-cad-info", _ => this.GetPartCadInfo());
     this.Put("/production/maintenance/part-cad-info/{id}", parameters => this.UpdatePart(parameters.id));
 }
 public TypeOfSaleModule(
     IFacadeService <TypeOfSale, string, TypeOfSaleResource, TypeOfSaleResource> typeOfSaleService)
 {
     this.typeOfSaleService = typeOfSaleService;
     this.Get("/products/maint/types-of-sale/", _ => this.GetTypesOfSale());
     this.Get("/products/maint/types-of-sale/{name}", parameters => this.GetTypeOfSaleByName(parameters.name));
     this.Put("/products/maint/types-of-sale/{name}", parameters => this.UpdateTypeOfSale(parameters.name));
     this.Post("/products/maint/types-of-sale", _ => this.AddTypeOfSale());
 }
 public ManufacturingOperationsModule(
     IFacadeService <ManufacturingOperation, int, ManufacturingOperationResource, ManufacturingOperationResource> manufacturingOperationsService)
 {
     this.manufacturingOperationsService = manufacturingOperationsService;
     this.Get("/production/resources/manufacturing-operations", _ => this.GetAll());
     this.Get("/production/resources/manufacturing-operations/{manufacturingId*}", parameters => this.GetById(parameters.manufacturingId));
     this.Put("/production/resources/manufacturing-operations/{manufacturingId*}", parameters => this.UpdateManufacturingOperation(parameters.manufacturingId));
     this.Post("/production/resources/manufacturing-operations", parameters => this.AddManufacturingOperation());
 }
        public ProductRangeModule(IFacadeService <ProductRange, int, ProductRangeResource, ProductRangeUpdateResource> productRangeService)
        {
            this.productRangeService = productRangeService;

            this.Get("/products/maint/product-ranges", _ => this.GetProductRanges());
            this.Post("/products/maint/product-ranges", _ => this.AddProductRange());
            this.Get("/products/maint/product-ranges/{id}", parameters => this.GetProductRange(parameters.id));
            this.Put("/products/maint/product-ranges/{id}", parameters => this.UpdateProductRange(parameters.id));
        }
 public ManufacturingResourceModule(
     IFacadeService <ManufacturingResource, string, ManufacturingResourceResource, ManufacturingResourceResource> manufacturingResourceService)
 {
     this.manufacturingResourceService = manufacturingResourceService;
     this.Get("/production/resources/manufacturing-resources/{resourceCode*}", parameters => this.GetManufacturingResourceById(parameters.resourceCode));
     this.Get("/production/resources/manufacturing-resources", _ => this.GetAllManufacturingResources());
     this.Put("/production/resources/manufacturing-resources/{resourceCode*}", parameters => this.UpdateManufacturingResource(parameters.resourceCode));
     this.Post("/production/resources/manufacturing-resources", _ => this.AddManufacturingResource());
 }
Exemple #26
0
 public RequisitionModule(
     IRequisitionActionsFacadeService requisitionActionsFacadeService,
     IFacadeService <RequisitionHeader, int, RequisitionResource, RequisitionResource> requisitionFacadeService)
 {
     this.requisitionActionsFacadeService = requisitionActionsFacadeService;
     this.requisitionFacadeService        = requisitionFacadeService;
     this.Get("/logistics/requisitions/{reqNumber}", p => this.GetReq(p.reqNumber));
     this.Post("/logistics/requisitions/actions/un-allocate", _ => this.Unallocate());
     this.Post("/logistics/requisitions/{reqNumber}/lines/{lineNumber}/un-allocate", p => this.Unallocate(p.reqNumber, p.lineNumber));
 }
Exemple #27
0
 public VatCodeModule(
     IFacadeService <VatCode, string, VatCodeResource, VatCodeResource> vatCodeService,
     IAuthorisationService authorisationService)
 {
     this.vatCodeService       = vatCodeService;
     this.authorisationService = authorisationService;
     this.Get("/products/maint/vat-codes/{code}", parameters => this.GetVatCodeByCode(parameters.code));
     this.Get("/products/maint/vat-codes/", _ => this.GetVatCodes());
     this.Put("/products/maint/vat-codes/{code}", parameters => this.UpdateVatCode(parameters.code));
     this.Post("/products/maint/vat-codes", _ => this.AddVatCode());
 }
Exemple #28
0
 public SernosNoteModule(
     IFacadeService <SernosNote, int, SernosNoteCreateResource, SernosNoteResource> sernosNoteService,
     IAuthorisationService authorisationService)
 {
     this.sernosNoteService    = sernosNoteService;
     this.authorisationService = authorisationService;
     this.Get("/products/maint/serial-numbers/notes", _ => this.GetSernosNotes());
     this.Get("/products/maint/serial-numbers/notes/{id}", parameters => this.GetSernosNoteById(parameters.id));
     this.Post("/products/maint/serial-numbers/notes", _ => this.AddSernosNote());
     this.Put("/products/maint/serial-numbers/notes/{id}", parameters => this.UpdateSernosNote(parameters.id));
 }
 public ManufacturingRoutesModule(
     IFacadeService <ManufacturingRoute, string, ManufacturingRouteResource, ManufacturingRouteResource> manufacturingRouteService,
     IAuthorisationService authorisationService)
 {
     this.manufacturingRouteService = manufacturingRouteService;
     this.authorisationService      = authorisationService;
     this.Get("/production/resources/manufacturing-routes", _ => this.SearchOrGetAll());
     this.Get("/production/resources/manufacturing-routes/{routeCode*}", parameters => this.GetById(parameters.routeCode));
     this.Put("/production/resources/manufacturing-routes/{routeCode*}", parameters => this.UpdateManufacturingRoute(parameters.routeCode));
     this.Post("/production/resources/manufacturing-routes", parameters => this.AddManufacturingRoute());
 }
Exemple #30
0
 public SerialNumberService(
     IRepository <SerialNumber, int> serialNumberRepository,
     ITransactionManager transactionManager,
     ISerialNumberFactory serialNumberFactory,
     IFacadeService <SernosNote, int, SernosNoteCreateResource, SernosNoteResource> sernosNoteService)
     : base(serialNumberRepository, transactionManager)
 {
     this.serialNumberRepository = serialNumberRepository;
     this.transactionManager     = transactionManager;
     this.serialNumberFactory    = serialNumberFactory;
     this.sernosNoteService      = sernosNoteService;
 }