啊鑫
2024-07-12 f80d5cdf701b3d3f2e21bffaff6e99a2a240fc0e
MES.Service/service/BasicData/MesSupplierManager.cs
@@ -28,7 +28,7 @@
                        return 1;
                    break;
                case "3":
                    if (DeleteSupplier(db, entity.Id))
                    if (DeleteSupplier(entity.Id))
                        return 1;
                    break;
                case "4":
@@ -108,12 +108,9 @@
        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("删除失败");
    }