| | |
| | | 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("删除失败"); |
| | | } |
| | |
| | | SuppNo = supplier.FNumber, |
| | | SuppSname = supplier.FShortName, |
| | | SuppName = supplier.FName, |
| | | Lxr = supplier.F_UNW_LXR, |
| | | Telf1 = supplier.F_UNW_LXRDH, |
| | | Lxr = supplier.FContact, |
| | | Telf1 = supplier.FTel, |
| | | Fstaffid = supplier.FStaffId, |
| | | Fforbidstatus = supplier.FForbidStatus, |
| | | CreateDate = DateTime.Now, |
| | | CreateOrg= Convert.ToDecimal(supplier.FCreateOrgId), |
| | | UseOrg= Convert.ToDecimal(supplier.FUseOrgId), |
| | | Remark=supplier.FDescription, |
| | | Company = "1000", |
| | | Factory = "1000" |
| | | }; |