From 4e9ec8d46bc8edb7cda3f6633f4bdd6b9bbc0085 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 24 七月 2023 08:50:59 +0800
Subject: [PATCH] 1
---
DAL/基础资料/其他基础资料/ClsGy_MatePriceSup_Ctl.cs | 62 ++++++++++++++++++++-----------
1 files changed, 40 insertions(+), 22 deletions(-)
diff --git "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs" "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs"
index 8ac0595..32c854b 100644
--- "a/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs"
+++ "b/DAL/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_MatePriceSup_Ctl.cs"
@@ -11,6 +11,7 @@
//鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
public string HOldNumber;
public List<Model.ClsGy_MatePriceSup_Model> DetailColl = new List<Model.ClsGy_MatePriceSup_Model>();
+ public Model.ClsGy_MatePriceSup_Model oModel = new Model.ClsGy_MatePriceSup_Model();
@@ -58,17 +59,26 @@
try
{
oCn.BeginTran();
- //鎻掑叆瀛愯〃
- foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl)
- {
- oCn.RunProc("Insert into Gy_MatePriceSup " +
- " (HInterID,HEntryID,HMaterID,HRelationID" +
+ //鎻掑叆琛�
+ //foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl)
+ //{
+ // oCn.RunProc("Insert into Gy_MatePriceSup " +
+ // " (HInterID,HEntryID,HMaterID,HRelationID" +
+ // ",HUnitID,HBeginQty,HEndQty,HCurID,HType" +
+ // ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" +
+ // " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() +
+ // "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" +
+ // "," + oSub.HPrice.ToString() + ",'" + "GETDATE()" + "','" + "GETDATE()" + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
+ //}
+ oCn.RunProc("Insert into " + MvarItemKey + " " +
+ " (HInterID,HEntryID,HMaterID,HRelationID" +
",HUnitID,HBeginQty,HEndQty,HCurID,HType" +
- ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" +
- " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() +
- "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" +
- "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
- }
+ ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate) " +
+ " values(" + oModel.HInterID.ToString() + "," + oModel.HEntryID.ToString() + "," + oModel.HMaterID.ToString() + "," + oModel.HRelationID.ToString() +
+ "," + oModel.HUnitID.ToString() + "," + oModel.HBeginQty.ToString() + "," + oModel.HEndQty.ToString() + "," + oModel.HCurID.ToString() + ",'" + oModel.HType + "'" +
+ "," + oModel.HPrice.ToString() + ",'" + oModel.HBeginDate + "','" + oModel.HEndDate + "'," + oModel.HUsed + ",'" + oModel.HRemark + "','" + oModel.HMaker + "','" + oModel.HMakeDate + "') ");
+ //淇敼涓婄骇涓洪潪鏈骇浠g爜
+ //oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
oCn.Commit();
return true;
}
@@ -85,18 +95,25 @@
try
{
oCn.BeginTran();
- DeleteByID(sItemID); //鍒犻櫎璁板綍
- //鎻掑叆琛�
- foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl)
- {
- oCn.RunProc("Insert into Gy_MatePriceSup " +
- " (HInterID,HEntryID,HMaterID,HRelationID" +
- ",HUnitID,HBeginQty,HEndQty,HCurID,HType" +
- ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" +
- " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() +
- "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" +
- "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
- }
+ oCn.RunProc("Update " + MvarItemKey + " set " +
+ " HPrice='" + oModel.HPrice + "'" +
+ ",HRemark='" + oModel.HRemark + "'" +
+ ",HMaterID=" + oModel.HMaterID.ToString() +
+ ",HUnitID=" + oModel.HUnitID.ToString() +
+ ",HCurID=" + oModel.HCurID.ToString() +
+ " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //DeleteByID(sItemID); //鍒犻櫎璁板綍
+ ////鎻掑叆琛�
+ //foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl)
+ //{
+ // oCn.RunProc("Insert into Gy_MatePriceSup " +
+ // " (HInterID,HEntryID,HMaterID,HRelationID" +
+ // ",HUnitID,HBeginQty,HEndQty,HCurID,HType" +
+ // ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" +
+ // " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() +
+ // "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" +
+ // "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
+ //}
oCn.Commit();
return true;
}
@@ -190,6 +207,7 @@
{
MvarItemKey = "Gy_MatePriceSup";
MvarReportTitle = "閲囪喘浠锋牸璧勬枡璁剧疆";
+ oModel = new Model.ClsGy_MatePriceSup_Model();
}
}
}
--
Gitblit v1.9.1