| | |
| | | return 1; |
| | | break; |
| | | case "3": |
| | | if (DeleteSupplier(db, entity.Id)) |
| | | if (DeleteSupplier(entity.Id)) |
| | | return 1; |
| | | break; |
| | | case "4": |
| | |
| | | throw new NotImplementedException("插入失败"); |
| | | } |
| | | |
| | | private bool DeleteSupplier(SqlSugarScope db, decimal supplierId) |
| | | private bool DeleteSupplier(decimal supplierId) |
| | | { |
| | | var deleteById = db.Deleteable<MesSupplier>().In(supplierId) |
| | | .ExecuteCommand(); |
| | | if (deleteById > 0) |
| | | return true; |
| | | if (base.DeleteById(supplierId)) return true; |
| | | |
| | | throw new NotImplementedException("删除失败"); |
| | | } |
| | |
| | | return new MesSupplier |
| | | { |
| | | Id = Convert.ToDecimal(supplier.Id), |
| | | Type = supplier.Type, |
| | | SuppNo = supplier.FNumber, |
| | | SuppSname = supplier.FShortName, |
| | | SuppName = supplier.FName, |