|  |  | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 设备工艺参数订单点检表模块   从列表选中打开单据,返回单据信息时调用 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 设备工艺参数订单点检表模块   从列表选中打开单据,返回单据信息时调用 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="HInterID">主键ID</param> | 
 |  |  |         /// <param name="HMaker">制单人</param> | 
 |  |  |         /// <param name="sWhere">筛选条件</param> | 
 |  |  |         /// <returns>返回符合条件的条目数和当前主键对应的条目在表中的位置</returns> | 
 |  |  |         [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Position")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetSB_EquipICMOTechParamBill_Position(Int64 HInterID, string HMaker, string sWhere) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //判断权限 | 
 |  |  |                 if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker)) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "您没有该模块编辑权限,请与管理员联系!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 string sql = "exec h_p_SB_EquipCMOTechParamBillListEdit_GetCurrRecord @HInterID = N'" + HInterID | 
 |  |  |                     + "', @sWhere = N'" + sWhere + "'"; | 
 |  |  |  | 
 |  |  |                 //返回列表信息 | 
 |  |  |                 ds = oCn.RunProcReturn(sql, "h_p_SB_EquipCMOTechParamBillListEdit_GetCurrRecord"); | 
 |  |  |      | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); | 
 |  |  |                     objJsonResult.Message = "成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); | 
 |  |  |                     objJsonResult.Message = "成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "返回设备工艺参数订单点检表信息失败!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 设备工艺参数订单点检表模块   从列表选中打开单据,返回单据信息时调用 | 
 |  |  |         /// <summary> | 
 |  |  |         ///  | 
 |  |  |         /// </summary> | 
 |  |  |         /// <param name="HMaker">制单人</param> | 
 |  |  |         /// <param name="sWhere">筛选条件</param> | 
 |  |  |         /// <param name="current">条目在数据表中的位置</param> | 
 |  |  |         /// <returns>单据信息和位置</returns> | 
 |  |  |         [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_ByPosition")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetSB_EquipICMOTechParamBill_ByPosition(string HMaker, string sWhere, int current) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //判断权限 | 
 |  |  |                 if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker)) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "您没有该模块编辑权限,请与管理员联系!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 string sql = "EXEC [dbo].[h_p_SB_EquipICMOTechParamBill_Edit_WithPosition]"  | 
 |  |  |                 + " @Postition = N'"+ current +"'"  | 
 |  |  |               + " ,@sWhere = N'"+ sWhere +"'"; | 
 |  |  |                 //返回列表信息 | 
 |  |  |                 ds = oCn.RunProcReturn(sql, "h_p_SB_EquipICMOTechParamBill_Edit_WithPosition"); | 
 |  |  |  | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "未查询到该设备工艺参数订单点检表,请刷新数据后重新选择!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "返回设备工艺参数订单点检表信息失败!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 设备工艺参数订单点检表模块   从列表选中打开单据,返回单据信息时调用 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 设备工艺参数订单点检表编辑时,根据单据ID获取单据信息 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_QueryHistoryRecord")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object GetSB_EquipICMOTechParamBill_QueryHistoryRecord(Int64 HInterID, string HMaker, string HProcID, String HSourceID) | 
 |  |  |         { | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 //判断权限 | 
 |  |  |                 if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker)) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "您没有该模块编辑权限,请与管理员联系!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 string sql = "exec h_p_SB_EquipICMOTechParamBill_Edit_QueryHistoryRecord " | 
 |  |  |                     + "@HInterID = N'" + HInterID + "'" | 
 |  |  |                     + ", @HProcID = N'" + HProcID + "'" | 
 |  |  |                     + ", @HSourceID = N'" + HSourceID + "'"; | 
 |  |  |                 LogService.Write(sql); | 
 |  |  |                 //返回列表信息 | 
 |  |  |                 ds = oCn.RunProcReturn(sql | 
 |  |  |                     , "h_p_SB_EquipICMOTechParamBill_Edit_QueryHistoryRecord"); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "未查询到该设备工艺参数订单点检表,请刷新数据后重新选择!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 1; | 
 |  |  |                     objJsonResult.Message = "成功!"; | 
 |  |  |                     objJsonResult.data = ds.Tables[0]; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "返回设备工艺参数订单点检表信息失败!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         #region 设备工艺参数订单点检表保存 | 
 |  |  |         /// <summary> | 
 |  |  |         /// 设备工艺参数订单点检表保存 |