Exemplo n.º 1
0
 public GarmentInvoiceMonitoringService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     carepository      = serviceProvider.GetService <IGarmentShippingCreditAdviceRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 2
0
        public Mock <IServiceProvider> GetServiceProvider(IGarmentPackingListRepository plrepository, IGarmentShippingInvoiceRepository repository, IGarmentShippingInvoiceItemRepository itemrepository, IGarmentShippingInvoiceAdjustmentRepository adjrepository, IGarmentCoverLetterRepository clrepository, IGarmentShippingCreditAdviceRepository carepository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceRepository)))
            .Returns(repository);

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceItemRepository)))
            .Returns(itemrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceAdjustmentRepository)))
            .Returns(adjrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(plrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentCoverLetterRepository)))
            .Returns(clrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingCreditAdviceRepository)))
            .Returns(carepository);

            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            return(spMock);
        }
 public GarmentShippingGenerateDataService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     itemrepository    = serviceProvider.GetService <IGarmentShippingInvoiceItemRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 4
0
        public GarmentCoverLetterService(IServiceProvider serviceProvider)
        {
            _repository            = serviceProvider.GetService <IGarmentCoverLetterRepository>();
            _packingListrepository = serviceProvider.GetService <IGarmentPackingListRepository>();

            _identityProvider = serviceProvider.GetService <IIdentityProvider>();
        }
 public GarmentLetterOfCreditMonitoringService(IServiceProvider serviceProvider)
 {
     lcrepository      = serviceProvider.GetService <IGarmentLetterOfCreditRepository>();
     invrepository     = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 6
0
 public OmzetYearUnitService(IServiceProvider serviceProvider)
 {
     _serviceProvider          = serviceProvider;
     shippingInvoiceRepository = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     packingListRepository     = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider         = serviceProvider.GetService <IIdentityProvider>();
 }
 public RecapOmzetPerMonthMonitoringService(IServiceProvider serviceProvider)
 {
     _serviceProvider          = serviceProvider;
     packingListRepository     = serviceProvider.GetService <IGarmentPackingListRepository>();
     shippingInvoiceRepository = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     _identityProvider         = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 8
0
 public GarmentPackingListService(IServiceProvider serviceProvider)
 {
     _packingListRepository = serviceProvider.GetService <IGarmentPackingListRepository>();
     _invoiceRepository     = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     _identityProvider      = serviceProvider.GetService <IIdentityProvider>();
     _azureImageService     = serviceProvider.GetService <IAzureImageService>();
 }
Exemplo n.º 9
0
 public GarmentOmzetMonthlyByComodityService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     itemrepository    = serviceProvider.GetService <IGarmentShippingInvoiceItemRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 10
0
 public GarmentFinanceExportSalesJournalService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
     _serviceProvider  = serviceProvider;
 }
Exemplo n.º 11
0
        public OmzetYearCountryService(IServiceProvider serviceProvider)
        {
            shippingInvoiceRepository     = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
            shippingpackinglistRepository = serviceProvider.GetService <IGarmentPackingListRepository>();

            _identityProvider = serviceProvider.GetService <IIdentityProvider>();
        }
Exemplo n.º 12
0
 public GarmentRecapOmzetReportService(IServiceProvider serviceProvider)
 {
     _serviceProvider  = serviceProvider;
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     itemrepository    = serviceProvider.GetService <IGarmentShippingInvoiceItemRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 13
0
 public GarmentShippingInstructionMonitoringService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInstructionRepository>();
     invrepository     = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     clrepository      = serviceProvider.GetService <IGarmentCoverLetterRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 14
0
        public PaymentDispositionRecapService(IServiceProvider serviceProvider)
        {
            this.serviceProvider = serviceProvider;

            _recapRepository = serviceProvider.GetService <IGarmentShippingPaymentDispositionRecapRepository>();
            _paymentDispositionRepository = serviceProvider.GetService <IGarmentShippingPaymentDispositionRepository>();
            _invoiceRepository            = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
            _packingListRepository        = serviceProvider.GetService <IGarmentPackingListRepository>();
        }
        //private readonly DbSet<GarmentPackingListModel> dbSet;


        public GarmentMonitoringDeliveredPackingListSampleService(IServiceProvider serviceProvide)
        {
            _serviceProvider     = serviceProvide;
            _identityProvider    = serviceProvide.GetService <IIdentityProvider>();
            plrepository         = serviceProvide.GetService <IGarmentPackingListRepository>();
            detailrepository     = serviceProvide.GetService <IGarmentPackingListDetailRepository>();
            detailsizerepository = serviceProvide.GetService <IGarmentPackingListDetailSizeRepository>();
            itemrepository       = serviceProvide.GetService <IGarmentPackingListItemRepository>();
        }
Exemplo n.º 16
0
 public GarmentCMTSalesService(IServiceProvider serviceProvider)
 {
     _serviceProvider  = serviceProvider;
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     carepository      = serviceProvider.GetService <IGarmentShippingCreditAdviceRepository>();
     itemrepository    = serviceProvider.GetService <IGarmentShippingInvoiceItemRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
Exemplo n.º 17
0
 public GarmentInvoiceHistoryMonitoringService(IServiceProvider serviceProvider)
 {
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     sirepository      = serviceProvider.GetService <IGarmentShippingInstructionRepository>();
     clrepository      = serviceProvider.GetService <IGarmentCoverLetterRepository>();
     carepository      = serviceProvider.GetService <IGarmentShippingCreditAdviceRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
 public GarmentShipmentMonitoringService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     itemrepository    = serviceProvider.GetService <IGarmentShippingInvoiceItemRepository>();
     adjrepository     = serviceProvider.GetService <IGarmentShippingInvoiceAdjustmentRepository>();
     clrepository      = serviceProvider.GetService <IGarmentCoverLetterRepository>();
     plrepository      = serviceProvider.GetService <IGarmentPackingListRepository>();
     carepository      = serviceProvider.GetService <IGarmentShippingCreditAdviceRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentPackingListRepository repository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(repository);
            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            return(spMock);
        }
        private Mock <IServiceProvider> GetServiceProviderWithIdentity(IGarmentPackingListRepository repository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(repository);
            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider
            {
                TimezoneOffset = 7,
                Token          = "INITOKEN",
                Username       = "******"
            });

            return(spMock);
        }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentPackingListRepository plrepository, IGarmentShippingInvoiceRepository repository, IGarmentShippingInvoiceItemRepository itemrepository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceRepository)))
            .Returns(repository);

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceItemRepository)))
            .Returns(itemrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(plrepository);

            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            return(spMock);
        }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingInvoiceRepository repository, IGarmentPackingListRepository plrepository)
        {
            var spMock                   = new Mock <IServiceProvider>();
            var httpClientService        = new Mock <IHttpClientService>();
            HttpResponseMessage messageC = new HttpResponseMessage(System.Net.HttpStatusCode.OK);

            messageC.Content = new StringContent("{\"apiVersion\":\"1.0\",\"statusCode\":200,\"message\":\"Ok\",\"data\":{\"Rate\":14500.0,\"Uid\":\"no\",\"Date\":\"2018-10-20T17:00:00\",\"Code\":\"USD\"},\"info\":{\"count\":1,\"page\":1,\"size\":1,\"total\":1,\"order\":{\"Date\":\"desc\"},\"select\":[\"Rate\"]}}");

            var HttpClientService = new Mock <IHttpClientService>();

            HttpClientService
            .Setup(x => x.GetAsync(It.IsAny <string>()))
            .ReturnsAsync(messageC);

            HttpClientService
            .Setup(x => x.GetAsync(It.IsRegex($"^master/garment-currencies/sales-debtor-currencies")))
            .ReturnsAsync(new HttpResponseMessage(System.Net.HttpStatusCode.OK)
            {
                Content = new StringContent(JsonConvert.SerializeObject(new
                {
                    apiVersion = "1.0",
                    statusCode = 200,
                    message    = "Ok",
                    data       = JsonConvert.SerializeObject(new GarmentCurrency {
                    })
                }))
            });


            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceRepository)))
            .Returns(repository);

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(plrepository);

            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            spMock
            .Setup(x => x.GetService(typeof(IHttpClientService)))
            .Returns(HttpClientService.Object);
            return(spMock);
        }
 public GarmentPackingListMonitoringService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentPackingListRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingInstructionRepository repository, IGarmentShippingInvoiceRepository invrepository, IGarmentPackingListRepository plrepository, IGarmentCoverLetterRepository clrepository)

        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInstructionRepository)))
            .Returns(repository);

            spMock.Setup(s => s.GetService(typeof(IGarmentShippingInvoiceRepository)))
            .Returns(invrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentPackingListRepository)))
            .Returns(plrepository);

            spMock.Setup(s => s.GetService(typeof(IGarmentCoverLetterRepository)))
            .Returns(clrepository);

            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            return(spMock);
        }
 public GarmentShippingInvoiceService(IServiceProvider serviceProvider)
 {
     _repository          = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
     plrepository         = serviceProvider.GetService <IGarmentPackingListRepository>();
     this.serviceProvider = serviceProvider;
 }