示例#1
0
        public async Task Should_Success_Get_Keluar_BP_Report_Excel_By_User_Null_Parameter()
        {
            GarmentUnitReceiptNoteFacade facade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));

            GarmentDeliveryOrderFacade facadeDO = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilDO = dataUtilDO(facadeDO, GetCurrentMethod());

            var garmentunitreceiptnoteFacade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilBon = new GarmentUnitReceiptNoteDataUtil(garmentunitreceiptnoteFacade, datautilDO);

            var garmentBeaCukaiFacade = new GarmentBeacukaiFacade(_dbContext(GetCurrentMethod()), GetServiceProvider());
            var datautilBC            = new GarmentBeacukaiDataUtil(datautilDO, garmentBeaCukaiFacade);

            MonitoringCentralBillExpenditureFacade KeluarBP = new MonitoringCentralBillExpenditureFacade(_dbContext(GetCurrentMethod()));

            var dataDO = await datautilDO.GetTestData();

            var dataBon = await datautilBon.GetTestData();

            var dataBC = await datautilBC.GetTestData(USERNAME);

            DateTime d1 = dataBon.ReceiptDate.DateTime.AddDays(30);
            DateTime d2 = dataBon.ReceiptDate.DateTime.AddDays(30);

            var Response = KeluarBP.GenerateExcelMonitoringKeluarBonPusatByUser(d1, d2, 1, 25, "{}", 7);

            Assert.IsType(typeof(System.IO.MemoryStream), Response);
        }
示例#2
0
        public async Task Should_Success_Get_All_Data_Report()
        {
            var serviceProvider = GetServiceProvider();
            var dbContext       = _dbContext(GetCurrentMethod());


            var facadeDO   = new GarmentDeliveryOrderFacade(serviceProvider, dbContext);
            var dataUtilDO = _dataUtilDO(facadeDO, GetCurrentMethod());

            var FacadeCorrection   = new GarmentCorrectionNotePriceFacade(serviceProvider, dbContext);
            var dataUtilCorrection = new GarmentCorrectionNoteDataUtil(FacadeCorrection, dataUtilDO);

            var FacadeUnitReceipt   = new GarmentUnitReceiptNoteFacade(serviceProvider, dbContext);
            var dataUtilUnitReceipt = new GarmentUnitReceiptNoteDataUtil(FacadeUnitReceipt, dataUtilDO, null);

            var Facade = new GarmentReceiptCorrectionFacade(dbContext, serviceProvider);
            var dataUtilReceiptCorr = new GarmentReceiptCorrectionDataUtil(Facade, dataUtilUnitReceipt);

            var dataDO = await dataUtilDO.GetTestData5();

            var dataCorr = await dataUtilCorrection.GetTestData2(dataDO);

            long nowTicks = DateTimeOffset.Now.Ticks;
            var  dataUnit = await dataUtilUnitReceipt.GetTestData(dataDO, nowTicks);

            var dataReceipt = await dataUtilReceiptCorr.GetTestData(dataUnit);

            var dateFrom = DateTimeOffset.MinValue;
            var dateTo   = DateTimeOffset.UtcNow;
            var facade1  = new GarmentReceiptCorrectionReportFacade(dbContext, serviceProvider);

            var Response = facade1.GetReport(dataReceipt.UnitCode, null, dateFrom, dateTo, "{}", 1, 25);

            Assert.NotNull(Response.Item1);
        }
示例#3
0
        public async Task Should_Success_Get_Keluar_BP_Report_Data_By_User()
        {
            GarmentUnitReceiptNoteFacade facade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));

            GarmentDeliveryOrderFacade facadeDO = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilDO = dataUtilDO(facadeDO, GetCurrentMethod());

            var garmentunitreceiptnoteFacade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilBon = new GarmentUnitReceiptNoteDataUtil(garmentunitreceiptnoteFacade, datautilDO);

            var garmentBeaCukaiFacade = new GarmentBeacukaiFacade(_dbContext(GetCurrentMethod()), GetServiceProvider());
            var datautilBC            = new GarmentBeacukaiDataUtil(datautilDO, garmentBeaCukaiFacade);

            MonitoringCentralBillExpenditureFacade KeluarBP = new MonitoringCentralBillExpenditureFacade(_dbContext(GetCurrentMethod()));

            var dataDO = await datautilDO.GetTestData();

            var dataBon = await datautilBon.GetTestData();

            var dataBC = await datautilBC.GetTestData(USERNAME);

            var Response = KeluarBP.GetMonitoringKeluarBonPusatByUserReport(dataBon.ReceiptDate.DateTime, dataBon.ReceiptDate.DateTime, 1, 25, "{}", 7);

            Assert.NotNull(Response.Item1);
        }
示例#4
0
        public async Task Should_Success_Get_Terima_BP_Report_Excel_By_User()
        {
            GarmentUnitReceiptNoteFacade facade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));

            GarmentDeliveryOrderFacade facadeDO = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilDO = dataUtilDO(facadeDO, GetCurrentMethod());

            var garmentunitreceiptnoteFacade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilBon = new GarmentUnitReceiptNoteDataUtil(garmentunitreceiptnoteFacade, datautilDO);

            var garmentBeaCukaiFacade = new GarmentBeacukaiFacade(_dbContext(GetCurrentMethod()), GetServiceProvider());
            var datautilBC            = new GarmentBeacukaiDataUtil(datautilDO, garmentBeaCukaiFacade);

            MonitoringCentralBillReceptionFacade TerimaBP = new MonitoringCentralBillReceptionFacade(_dbContext(GetCurrentMethod()));

            var dataDO = await datautilDO.GetTestData();

            var dataBon = await datautilBon.GetTestData();

            var dataBC = await datautilBC.GetTestData(USERNAME);

            var Response = TerimaBP.GenerateExcelMonitoringTerimaBonPusatByUser(null, null, 1, 25, "{}", 7);

            Assert.IsType(typeof(System.IO.MemoryStream), Response);
        }
示例#5
0
        public async Task Should_Success_Get_Terima_BP_Report_Data_By_User_Null_Pameter()
        {
            GarmentUnitReceiptNoteFacade facade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));

            GarmentDeliveryOrderFacade facadeDO = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilDO = dataUtilDO(facadeDO, GetCurrentMethod());

            var garmentunitreceiptnoteFacade = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(GetCurrentMethod()));
            var datautilBon = new GarmentUnitReceiptNoteDataUtil(garmentunitreceiptnoteFacade, datautilDO);

            var garmentBeaCukaiFacade = new GarmentBeacukaiFacade(_dbContext(GetCurrentMethod()), GetServiceProvider());
            var datautilBC            = new GarmentBeacukaiDataUtil(datautilDO, garmentBeaCukaiFacade);

            MonitoringCentralBillReceptionFacade TerimaBP = new MonitoringCentralBillReceptionFacade(_dbContext(GetCurrentMethod()));

            var dataDO = await datautilDO.GetTestData();

            var dataBon = await datautilBon.GetTestData();

            var dataBC = await datautilBC.GetTestData(USERNAME);

            DateTime d1 = dataBC.BeacukaiDate.DateTime.AddDays(30);
            DateTime d2 = dataBC.BeacukaiDate.DateTime.AddDays(30);

            var Response = TerimaBP.GetMonitoringTerimaBonPusatByUserReport(d1, d2, 1, 25, "{}", 7);

            Assert.NotNull(Response.Item1);
        }
        private GarmentUnitReceiptNoteDataUtil dataUtil(GarmentUnitReceiptNoteFacade facade, string testName)
        {
            var garmentPurchaseRequestFacade   = new GarmentPurchaseRequestFacade(GetServiceProvider(), _dbContext(testName));
            var garmentPurchaseRequestDataUtil = new GarmentPurchaseRequestDataUtil(garmentPurchaseRequestFacade);

            var garmentInternalPurchaseOrderFacade   = new GarmentInternalPurchaseOrderFacade(_dbContext(testName));
            var garmentInternalPurchaseOrderDataUtil = new GarmentInternalPurchaseOrderDataUtil(garmentInternalPurchaseOrderFacade, garmentPurchaseRequestDataUtil);

            var garmentExternalPurchaseOrderFacade   = new GarmentExternalPurchaseOrderFacade(GetServiceProvider(), _dbContext(testName));
            var garmentExternalPurchaseOrderDataUtil = new GarmentExternalPurchaseOrderDataUtil(garmentExternalPurchaseOrderFacade, garmentInternalPurchaseOrderDataUtil);

            var garmentDeliveryOrderFacade   = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(testName));
            var garmentDeliveryOrderDataUtil = new GarmentDeliveryOrderDataUtil(garmentDeliveryOrderFacade, garmentExternalPurchaseOrderDataUtil);

            var garmentUnitReceiptNoteFacade   = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(testName));
            var garmentUnitReceiptNoteDatautil = new GarmentUnitReceiptNoteDataUtil(garmentUnitReceiptNoteFacade, garmentDeliveryOrderDataUtil, null);

            var garmentUnitDeliveryOrderFacade   = new GarmentUnitDeliveryOrderFacade(_dbContext(testName), GetServiceProvider());
            var garmentUnitDeliveryOrderDatautil = new GarmentUnitDeliveryOrderDataUtil(garmentUnitDeliveryOrderFacade, garmentUnitReceiptNoteDatautil);

            var garmentUENFacade = new GarmentUnitExpenditureNoteFacade(GetServiceProvider(), _dbContext(testName));
            var dataUtilUEN      = new GarmentUnitExpenditureNoteDataUtil(garmentUENFacade, garmentUnitDeliveryOrderDatautil);

            return(new GarmentUnitReceiptNoteDataUtil(facade, garmentDeliveryOrderDataUtil, dataUtilUEN));
        }
        private GarmentReceiptCorrectionDataUtil dataUtil(GarmentReceiptCorrectionFacade facade, string testName)
        {
            var garmentPurchaseRequestFacade   = new GarmentPurchaseRequestFacade(ServiceProvider, _dbContext(testName));
            var garmentPurchaseRequestDataUtil = new GarmentPurchaseRequestDataUtil(garmentPurchaseRequestFacade);

            var garmentInternalPurchaseOrderFacade   = new GarmentInternalPurchaseOrderFacade(_dbContext(testName));
            var garmentInternalPurchaseOrderDataUtil = new GarmentInternalPurchaseOrderDataUtil(garmentInternalPurchaseOrderFacade, garmentPurchaseRequestDataUtil);

            var garmentExternalPurchaseOrderFacade   = new GarmentExternalPurchaseOrderFacade(ServiceProvider, _dbContext(testName));
            var garmentExternalPurchaseOrderDataUtil = new GarmentExternalPurchaseOrderDataUtil(garmentExternalPurchaseOrderFacade, garmentInternalPurchaseOrderDataUtil);

            var garmentDeliveryOrderFacade   = new GarmentDeliveryOrderFacade(GetServiceProvider(), _dbContext(testName));
            var garmentDeliveryOrderDataUtil = new GarmentDeliveryOrderDataUtil(garmentDeliveryOrderFacade, garmentExternalPurchaseOrderDataUtil);

            var garmentUnitReceiptNoteFacade   = new GarmentUnitReceiptNoteFacade(GetServiceProvider(), _dbContext(testName));
            var garmentUnitReceiptNoteDataUtil = new GarmentUnitReceiptNoteDataUtil(garmentUnitReceiptNoteFacade, garmentDeliveryOrderDataUtil);

            return(new GarmentReceiptCorrectionDataUtil(facade, garmentUnitReceiptNoteDataUtil));
        }
示例#8
0
        private GarmentStockOpnameDataUtil dataUtil(GarmentStockOpnameFacade facade, IServiceProvider serviceProvider, PurchasingDbContext dbContext)
        {
            var garmentPurchaseRequestFacade   = new GarmentPurchaseRequestFacade(serviceProvider, dbContext);
            var garmentPurchaseRequestDataUtil = new GarmentPurchaseRequestDataUtil(garmentPurchaseRequestFacade);

            var garmentInternalPurchaseOrderFacade   = new GarmentInternalPurchaseOrderFacade(dbContext);
            var garmentInternalPurchaseOrderDataUtil = new GarmentInternalPurchaseOrderDataUtil(garmentInternalPurchaseOrderFacade, garmentPurchaseRequestDataUtil);

            var garmentExternalPurchaseOrderFacade   = new GarmentExternalPurchaseOrderFacade(serviceProvider, dbContext);
            var garmentExternalPurchaseOrderDataUtil = new GarmentExternalPurchaseOrderDataUtil(garmentExternalPurchaseOrderFacade, garmentInternalPurchaseOrderDataUtil);

            var garmentDeliveryOrderFacade   = new GarmentDeliveryOrderFacade(serviceProvider, dbContext);
            var garmentDeliveryOrderDataUtil = new GarmentDeliveryOrderDataUtil(garmentDeliveryOrderFacade, garmentExternalPurchaseOrderDataUtil);

            var garmentUnitReceiptNoteFacade   = new GarmentUnitReceiptNoteFacade(serviceProvider, dbContext);
            var garmentUnitReceiptNoteDataUtil = new GarmentUnitReceiptNoteDataUtil(garmentUnitReceiptNoteFacade, garmentDeliveryOrderDataUtil);

            return(new GarmentStockOpnameDataUtil(facade, garmentUnitReceiptNoteDataUtil));
        }
示例#9
0
        public async Task Should_Success_Get_Excel()
        {
            var serviceProvider = GetServiceProvider();
            var dbContext       = _dbContext(GetCurrentMethod());


            var facadeDO   = new GarmentDeliveryOrderFacade(serviceProvider, dbContext);
            var dataUtilDO = _dataUtilDO(facadeDO, GetCurrentMethod());

            var FacadeCorrection   = new GarmentCorrectionNotePriceFacade(serviceProvider, dbContext);
            var dataUtilCorrection = new GarmentCorrectionNoteDataUtil(FacadeCorrection, dataUtilDO);

            var FacadeUnitReceipt   = new GarmentUnitReceiptNoteFacade(serviceProvider, dbContext);
            var dataUtilUnitReceipt = new GarmentUnitReceiptNoteDataUtil(FacadeUnitReceipt, dataUtilDO, null);

            var Facade = new GarmentReceiptCorrectionFacade(dbContext, serviceProvider);
            var dataUtilReceiptCorr = new GarmentReceiptCorrectionDataUtil(Facade, dataUtilUnitReceipt);

            var dataDO = await dataUtilDO.GetTestData5();

            var dataCorr = await dataUtilCorrection.GetTestData2(dataDO);

            long nowTicks = DateTimeOffset.Now.Ticks;
            var  dataUnit = await dataUtilUnitReceipt.GetTestData(dataDO, nowTicks);

            var dataReceipt = await dataUtilReceiptCorr.GetTestData(dataUnit);

            var dateFrom = DateTimeOffset.MinValue;
            var dateTo   = DateTimeOffset.UtcNow;
            var facade1  = new GarmentReceiptCorrectionReportFacade(dbContext, serviceProvider);



            var Response = facade1.GenerateExcel(dataReceipt.UnitCode, null, dateFrom, dateTo, "{}");

            //var garmentReceiptCorrectionFacade = new GarmentReceiptCorrectionFacade(_dbContext(GetCurrentMethod()),GetServiceProvider() );
            // var dataUtilReceiptNote = await dataUtil(Facade, GetCurrentMethod()).GetTestData();

            Assert.IsType <System.IO.MemoryStream>(Response);
        }
示例#10
0
 public GarmentUnitDeliveryOrderDataUtil(GarmentUnitDeliveryOrderFacade facade, GarmentUnitReceiptNoteDataUtil UNDataUtil)
 {
     this.facade     = facade;
     this.UNDataUtil = UNDataUtil;
 }
示例#11
0
 public GarmentBeacukaiDataUtil(GarmentDeliveryOrderDataUtil GarmentDeliveryOrderDataUtil, GarmentUnitReceiptNoteDataUtil GarmentUnitReceiptNoteDataUtil, GarmentBeacukaiFacade facade)
 {
     this.garmentDeliveryOrderDataUtil   = GarmentDeliveryOrderDataUtil;
     this.garmentUnitReceiptNoteDataUtil = GarmentUnitReceiptNoteDataUtil;
     this.facade = facade;
 }
 public GarmentReceiptCorrectionDataUtil(GarmentReceiptCorrectionFacade garmentReceiptCorrectionFacade, GarmentUnitReceiptNoteDataUtil garmentUnitReceiptNoteDataUtil)
 {
     this.garmentReceiptCorrectionFacade = garmentReceiptCorrectionFacade;
     this.garmentUnitReceiptNoteDataUtil = garmentUnitReceiptNoteDataUtil;
 }
示例#13
0
 public GarmentStockOpnameDataUtil(GarmentStockOpnameFacade facade, GarmentUnitReceiptNoteDataUtil garmentUnitReceiptNoteDataUtil)
 {
     this.facade = facade;
     this.unitReceiptNoteDataUtil = garmentUnitReceiptNoteDataUtil;
 }