| | |
| | | LastupdateDate = DateTime.Now, |
| | | Company = "1000", |
| | | Factory = "1000", |
| | | DataType = customer.FDocumentStatus |
| | | DataType = customer.FDocumentStatus, |
| | | Type = customer.Type |
| | | }; |
| | | } |
| | | |
| | |
| | | |
| | | var insert = db.Insertable(entity).ExecuteCommand(); |
| | | |
| | | if (insert > 0) |
| | | return true; |
| | | |
| | | return false; |
| | | return insert > 0; |
| | | } |
| | | |
| | | private bool InsertOrUpdateBatch(SqlSugarScope db, |
| | | List<MesCustomer> customerList) |
| | | { |
| | | foreach (var entity in customerList) |
| | | if (!InsertOrUpdate(db, entity)) |
| | | return false; |
| | | |
| | | return true; |
| | | return customerList.All(entity => InsertOrUpdate(db, entity)); |
| | | } |
| | | } |