From dc7b6c75f98b6924b7e091ee7ac6551470652d78 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 20 一月 2025 09:07:29 +0800 Subject: [PATCH] 修改订单单位 --- CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs index e24d161..45cc514 100644 --- a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs +++ b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs @@ -36,10 +36,21 @@ { return false; } + SqlParameter SuppliersId = null; + if (trueModel.SuppliersId.HasValue) + { + SuppliersId = new SqlParameter("@SuppliersId", trueModel.SuppliersId); + } + else + { + SuppliersId = new SqlParameter("@SuppliersId", DBNull.Value); + } + + IList<SqlParameter> sqlParms = new List<SqlParameter>() { new SqlParameter("@FirmId",trueModel.FirmId), - new SqlParameter("@SuppliersId",trueModel.SuppliersId), + SuppliersId, new SqlParameter("@GoodsId",trueModel.GoodsId), new SqlParameter("@ClearingStatusId",trueModel.ClearingStatusId), new SqlParameter("@Price",trueModel.Price), @@ -80,11 +91,21 @@ { return false; } + + SqlParameter SuppliersId = null; + if (trueModel.SuppliersId.HasValue) + { + SuppliersId = new SqlParameter("@SuppliersId", trueModel.SuppliersId); + } + else + { + SuppliersId = new SqlParameter("@SuppliersId", DBNull.Value); + } IList<SqlParameter> sqlParms = new List<SqlParameter>() { new SqlParameter("@Keyid",trueModel.Keyid), new SqlParameter("@FirmId",trueModel.FirmId), - new SqlParameter("@SuppliersId",trueModel.SuppliersId), + SuppliersId, new SqlParameter("@GoodsId",trueModel.GoodsId), new SqlParameter("@ClearingStatusId",trueModel.ClearingStatusId), new SqlParameter("@Price",trueModel.Price), -- Gitblit v1.9.1