| | |
| | | using System.IO; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using System.Windows.Forms; |
| | | using WebAPI.Controllers.SCGL.日计划管理; |
| | | using WebAPI.Models; |
| | | |
| | |
| | | //int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id |
| | | int OperationType = int.Parse(sArray[2].ToString());//数据类型 1添加 3修改 2 复制 |
| | | string user = sArray[3].ToString();//用户名 |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | try |
| | | { |
| | | //判断是否有编辑权限 |
| | |
| | | "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty + |
| | | "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate + |
| | | ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ") "); |
| | | |
| | | LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",新增工艺路线单据:" + HBillNo); |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "新增工艺路线单据:" + HBillNo + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','新增单据'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { //修改 |
| | |
| | | |
| | | //删除子表 |
| | | oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'"); |
| | | |
| | | LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",修改工艺路线单据:" + HBillNo); |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "修改工艺路线单据:" + HBillNo + "','LMES-工艺路线模块','" + DBUtility.ClsPub.IPAddress + "','修改单据'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | //保存子表 |
| | | objJsonResult = AddBillSub(msg3, HInterID, OperationType); |
| | |
| | | { |
| | | try |
| | | { |
| | | string flag = "flase"; |
| | | string sErrMsg = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg)) |
| | | { |
| | | if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y") |
| | | { |
| | | flag = "true"; |
| | | } |
| | | } |
| | | |
| | | oSystemParameter.ShowBill(ref sErrMsg); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = flag; |
| | | objJsonResult.data = oSystemParameter.omodel; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |