| | |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | //int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id |
| | | int OperationType = int.Parse(sArray[2].ToString());//数据类型 1添加 3修改 2 复制 |
| | | int OperationType = int.Parse(sArray[2].ToString());//数据类型 1添加 3修改 2 复制 4添加子工艺路线 |
| | | string user = sArray[3].ToString();//用户名 |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | user_LongShan = sArray[3].ToString();//用户名 |
| | |
| | | HName_LongShan = mainList[0].HName;//工艺路线名称 |
| | | |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "") |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "凯贝奈特") |
| | | { |
| | | if (HPicNumVer == "") |
| | | { |
| | |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and 单据号='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); |
| | | |
| | | if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//新增 |
| | | if ((OperationType == 1 || OperationType == 2|| OperationType == 4) && ds.Tables[0].Rows.Count == 0)//新增 |
| | | { |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_RoutingBillMain " + |
| | | "(HBillType,HInterID,HBillNo,HDate" + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,Hmakedate,HMaterID,HName,HMaterTypeID" + |
| | | ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" + |
| | | ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + |
| | | " values('" + BillType + "','"+(OperationType==4?"SUB":"") +"'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID + |
| | | "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) + |
| | | "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty + |
| | |
| | | oCN.RunProc("exec Gy_RoutingBill_LastProNo " + HInterID); |
| | | } |
| | | } |
| | | else if (IsProNo == 1 && OperationType == 1) |
| | | else if (IsProNo == 1 && (OperationType == 1 || OperationType == 4)) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); |
| | | |