public async Task <FpRegradingResultDocs> GetTestData() { FpRegradingResultDocs Data = GetNewData(); await this.Service.CreateAsync(Data); return(Data); }
public FpRegradingResultDocs GetNewData() { //UnitReceiptNoteViewModel unit = UnitReceiptNoteDataUtil.GetUnitReceiptNote(client); ////ProductViewModel product = ProductDataUtil.GetProduct(client); //MachineViewModel machine = MachineDataUtil.GetMachine(client); //SupplierViewModel supplier = SupplierDataUtil.GetSupplier(client); FpRegradingResultDocs TestData = new FpRegradingResultDocs { Date = DateTimeOffset.UtcNow, NoBon = "no", NoBonId = "1", MachineId = "1", MachineCode = "code", MachineName = "name", ProductId = "1", ProductCode = "code", ProductName = "name", SupplierId = "1", SupplierCode = "code", SupplierName = "name", Operator = "operator test", Shift = "shift 1 test", TotalLength = 100, OriginalGrade = "test grade", Remark = "test remark", UnitName = "PRINTING", _CreatedUtc = new DateTime(2019, 8, 11, 1, 1, 1), Details = new List <FpRegradingResultDocsDetails> { new FpRegradingResultDocsDetails() { Grade = "a", Length = 1, ProductCode = "code", ProductId = "1", ProductName = "name", Quantity = 1, Remark = "remar", Retur = "retur", _CreatedUtc = new DateTime(2019, 8, 11, 1, 1, 1), } } }; return(TestData); }
public List <FPReturnInvToPurchasingDetail> GetNewData(FpRegradingResultDocs fpRegradingResultDocs) { List <FPReturnInvToPurchasingDetail> list = new List <FPReturnInvToPurchasingDetail>(); foreach (FpRegradingResultDocsDetails detail in fpRegradingResultDocs.Details) { list.Add(new FPReturnInvToPurchasingDetail { FPRegradingResultDocsId = fpRegradingResultDocs.Id, FPRegradingResultDocsCode = fpRegradingResultDocs.Code, ProductId = detail.ProductId, ProductCode = detail.ProductCode, ProductName = detail.ProductName, Quantity = 1, Length = detail.Length, Description = "" }); } return(list); }