From f2a3e67d3ad970670b10cb394298bc0940ae699a Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 05 八月 2025 14:32:34 +0800
Subject: [PATCH] 20250805 作业本的总数量,单价在保存的时候再计算一次
---
CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_ProcurementDAL.cs
index e24d161..a9e3969 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),
@@ -55,7 +66,9 @@
new SqlParameter("@PaperWeightId",trueModel.PaperWeightId),
new SqlParameter("@tanPrice",trueModel.TanPrice??0),
new SqlParameter("@ReceiveMoney",decimal.Parse("0")),
- new SqlParameter("@Commodityid",trueModel.Commodityid)
+ new SqlParameter("@Commodityid",trueModel.Commodityid),
+ new SqlParameter("@orderId",trueModel.orderId.HasValue?trueModel.orderId.Value:0),
+ new SqlParameter("@DocumentName",string.IsNullOrEmpty(trueModel.DocumentName)?"":trueModel.DocumentName)
};
try
{
@@ -80,11 +93,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),
@@ -100,7 +123,8 @@
new SqlParameter("@PaperWeightId",trueModel.PaperWeightId),
new SqlParameter("@tanPrice",trueModel.TanPrice??0),
new SqlParameter("@ReceiveMoney",trueModel.ReceiveMoney),
- new SqlParameter("@Commodityid",trueModel.Commodityid)
+ new SqlParameter("@Commodityid",trueModel.Commodityid),
+ new SqlParameter("@WarehouseName",string.IsNullOrEmpty(trueModel.WarehouseName)?"":trueModel.WarehouseName),
};
try
{
--
Gitblit v1.9.1