From 16bb2f7b48cf2c3cfbb6a026c265d4e52d22eca4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期六, 29 十月 2022 17:11:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/基础资料/其他基础资料/ClsGy_StdWorkTimes_Ctl.cs |   43 ++++++++++++++++++++++++++++---------------
 1 files changed, 28 insertions(+), 15 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_StdWorkTimes_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_StdWorkTimes_Ctl.cs"
index 1a94969..30aa5ff 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_StdWorkTimes_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_StdWorkTimes_Ctl.cs"
@@ -63,10 +63,10 @@
                 {
                     oCn.RunProc("Insert into Gy_StdWorkTimes " +
                         " (HMaterID,HProcID,HStdWorkTimes,HUpperlimit,HLowerlimit" +
-                        ",HStopflag,HMaker,HMakeDate,HRemark,HUSEORGID)" +
+                        ",HStopflag,HMaker,HMakeDate,HRemark,HUSEORGID,HStdPiece,HStdPric)" +
                         " values(" + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HStdWorkTimes.ToString() +
                         "," + oSub.HUpperlimit.ToString() + "," + oSub.HLowerlimit.ToString() + "," + Convert.ToString(oSub.HStopflag ? 1 : 0) +
-                        ",'" + oSub.HMaker + "','" + oSub.HMakeDate + "','" + oSub.HRemark + "'," + oSub.HUSEORGID + ")");
+                        ",'" + oSub.HMaker + "','" + oSub.HMakeDate + "','" + oSub.HRemark + "'," + oSub.HUSEORGID+","+ oSub.HStdPiece.ToString()+","+ oSub.HStdPric.ToString() + ")");
                 }
                 oCn.Commit();
                 return true;
@@ -86,20 +86,19 @@
                 oCn.BeginTran();
 
                 //鎻掑叆琛�
-                foreach (Model.ClsGy_StdWorkTimes_Model oSub in DetailColl)
+              foreach (Model.ClsGy_StdWorkTimes_Model oSub in DetailColl)
                 {
                     string sql = string.Format(@"Update Gy_StdWorkTimes set" +
-                        "HMaterID=" + oSub.HMaterID.ToString() +
-                        "HProcID=" + oSub.HProcID.ToString() +
-                        "HStdWorkTimes=" + oSub.HStdWorkTimes.ToString() +
-                        "HUpperlimit=" + oSub.HUpperlimit.ToString() +
-                        "HLowerlimit=" + oSub.HLowerlimit.ToString() +
-                        "HStopflag=" + Convert.ToString(oSub.HStopflag ? 1 : 0) +
-                        "HMaker='" + oSub.HMaker + "'" +
-                        "HMakeDate='" + oSub.HMakeDate + "'" +
-                        "HRemark='" + oSub.HRemark.ToString() + "'" +
-                        "HUSEORGID=" + oSub.HUSEORGID +
-                         " where HInterID=" + sItemID);
+                        " HMaterID=" + oSub.HMaterID.ToString() +
+                        ",HProcID=" + oSub.HProcID.ToString() +
+                        ",HStdWorkTimes=" + oSub.HStdWorkTimes.ToString() +
+                        ",HUpperlimit=" + oSub.HUpperlimit.ToString() +
+                        ",HLowerlimit=" + oSub.HLowerlimit.ToString() +
+                        ",HMaker='" + oSub.HMaker + "'" +
+                        ",HMakeDate='" + oSub.HMakeDate + "'" +
+                        ",HRemark='" + oSub.HRemark.ToString() + "'" +
+                        ",HUSEORGID=" + oSub.HUSEORGID +
+                         " where HItemID=" + sItemID);
                     oCn.RunProc(sql);
                 }
                 oCn.Commit();
@@ -132,7 +131,7 @@
                     oSub.HRemark = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HRemark"]);
                     oSub.HMaker = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMaker"]);
                     oSub.HMakeDate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMakeDate"]);
-                    oSub.HStopflag = (bool)DsSub.Tables[0].Rows[i]["HStopflag"];
+                    oSub.HStopflag = ((DsSub.Tables[0].Rows[i]["HStopflag"].ToString() == "1")?true:false);
                     oSub.HUSEORGID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUSEORGID"]);
 
                     DetailColl.Add(oSub);
@@ -147,6 +146,20 @@
             }
         }
 
+        //鏍规嵁鐗╂枡ID銆佸伐搴廔D 鍒犻櫎 鏍囧噯宸ユ椂
+        public bool DeleteByMaterIDAndHProcID(Int64 HMaterID, Int64 HProcID)
+        {
+            try
+            {
+                oCn.RunProc("Delete from Gy_StdWorkTimes where HMaterID=" + HMaterID.ToString() + " and HProcID=" + HProcID.ToString());
+                return true;
+            }
+            catch (Exception e)
+            {
+                return false;
+            }
+        }
+
         public ClsGy_StdWorkTimes_Ctl()
         {
             MvarItemKey = "Gy_StdWorkTimes";

--
Gitblit v1.9.1