From a1709bcc95fe641126f5c34e0a344e406b467f88 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 16 五月 2023 11:11:15 +0800
Subject: [PATCH] 流转卡和生产订单只能自己删除自己的单据。pda进站单增加白坯发布字段,放在接收数量后面,不允许编辑,每次扫进站单出站单的时候,自动把白坯发布的汇总数量显示。生产订单模块增加一个字段,是否取库存,底部备注,做成下拉框。生产报表这个字段有值的不计算产能。工艺路线批量插入白坯定型和染厂(第一道和第二道)(把以前所有的流水号加20,在把白坯定型(10),和染厂(20)刷进去

---
 DAL/基础资料/其他基础资料/ClsGy_MateMould_Ctl.cs |   39 ++++++++++++++++++++++-----------------
 1 files changed, 22 insertions(+), 17 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_MateMould_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_MateMould_Ctl.cs"
index b3c8574..7118b63 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_MateMould_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_MateMould_Ctl.cs"
@@ -59,26 +59,28 @@
             {
                 oCn.BeginTran();
 
-                DataSet Ds;
-                Int64 HInterID = 1;
-                Ds = oCn.RunProcReturn("select MAX(HInterID) HInterID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
-                if (Ds.Tables[0].Rows.Count != 0 && ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()) != 0)
-                {
-                    HInterID = ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString());
-                    HInterID += 1;
-                }
-
-                DataSet Cs;
-                Int64 HEntryID = 1;
-                Cs = oCn.RunProcReturn("select MAX(HEntryID) HEntryID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
-                if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
-                {
-                    HEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
-                    HEntryID += 1;
-                }
+               
                 //鎻掑叆琛�
                 foreach (Model.ClsGy_MateMould_Model oSub in DetailColl)
                 {
+                    DataSet Ds;
+                    Int64 HInterID = 1;
+                    Ds = oCn.RunProcReturn("select MAX(HInterID) HInterID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
+                    if (Ds.Tables[0].Rows.Count != 0 && ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString()) != 0)
+                    {
+                        HInterID = ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString());
+                        HInterID += 1;
+                    }
+
+                    DataSet Cs;
+                    Int64 HEntryID = 1;
+                    Cs = oCn.RunProcReturn("select MAX(HEntryID) HEntryID from Gy_MateMouldInfo", "Gy_MateMouldInfo");
+                    if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
+                    {
+                        HEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
+                        HEntryID += 1;
+                    }
+
                     oCn.RunProc("Insert into Gy_MateMouldInfo " +
                         " (HInterID,HEntryID,HMaterID,HRelationID,HUnitID" +
                         ",HBeginDate,HEndDate" +
@@ -114,6 +116,9 @@
                     //        ",'" + oSub.HBeginDate.ToShortDateString() + "','" + oSub.HEndDate.ToShortDateString() + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') ");
                     oCn.RunProc("Update Gy_MateMouldInfo set " +
                        "HRemark='" + oSub.HRemark + "'" +
+                       ",HMaterID='" + oSub.HMaterID + "'" +
+                       ",HRelationID='" + oSub.HRelationID + "'" + 
+                       ",HUnitID='" + oSub.HUnitID + "'" +
                        //",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
                        //",HUseFlag=" + Convert.ToString(HUseFlag ? 1 : 0) +
                        //",HMakeTime= getdate()" +

--
Gitblit v1.9.1