| | |
| | | string user = sArray[3].ToString();//用户名 |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | user_LongShan = sArray[3].ToString();//用户名 |
| | | string HSouceBillType = sArray[4].ToString();//用户名 |
| | | string HBillSubType = sArray[4].ToString();//单据子类型 |
| | | try |
| | | { |
| | | if (HSouceBillType == "") |
| | | if (HBillSubType == "3301") |
| | | { |
| | | //判断是否有编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限编辑!"; |
| | | objJsonResult.Message = "工艺路线无权限编辑!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限编辑!"; |
| | | objJsonResult.Message = "子工艺路线无权限编辑!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + HInterID + " and 单据号='" + HBillNo + "'", "h_v_Gy_RoutingBillList"); |
| | | |
| | | if ((OperationType == 1 || OperationType == 2|| OperationType == 4) && ds.Tables[0].Rows.Count == 0)//新增 |
| | | if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//新增 |
| | | { |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_RoutingBillMain " + |
| | |
| | | ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" + |
| | | ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" + |
| | | ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + |
| | | " values('" + BillType + "','"+ HSouceBillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | " values('" + BillType + "','"+ HBillSubType + "'," + 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 || OperationType == 4)) |
| | | else if (IsProNo == 1 && (OperationType == 1)) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Gy_Process Where HTProcessFlag = 1 and HNumber='9999' ", "Gy_Process"); |
| | | |