private static string CreateIncomingForm(ReceiveFormEntity form, ReceiveFormItemEntity formItem, Database db, DbTransaction trans) { var incoming = new IncomingFormEntity { OrderId = form.OrderId, OrderFormNo = form.OrderFormNo, OrderDetailId = form.OrderDetailId, ApplyUnitId = form.ApplyUnitId, SerialId = formItem.SerialId, ProductId = form.ProductId, IncomingCount = formItem.ReceivedCount, HospitalId = form.HospitalId, VendorId = form.VendorId, IsConfirmed = false, CreatedId = formItem.ConfirmedId, CreatedTime = formItem.ConfirmedTime }; IncomingFormRepository.Create(incoming, db, trans); return(incoming.Id); }
private static string SaveIncomingForm(InspectionFormEntity entity, int scanCount, string userId, Database db, DbTransaction trans) { var incoming = new IncomingFormEntity { Id = Guid.NewGuid().ToString(), IncomingCount = scanCount, OrderId = entity.OrderId, OrderFormNo = entity.OrderFormNo, OrderDetailId = entity.OrderDetailId, HospitalId = entity.HospitalId, ApplyUnitId = entity.ApplyUnitId, VendorId = entity.VendorId, ProductId = entity.ProductId, IsConfirmed = entity.ScanOver, CreatedId = userId, CreatedTime = DateTime.Now }; IncomingFormRepository.Create(incoming, db, trans); return(incoming.Id); }