| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region 检验项目列表数据 |
| | | #region 检验项目分类列表数据 |
| | | /// <summary> |
| | | /// 返回检验项目列表 |
| | | ///参数:string sql。 |
| | |
| | | try |
| | | { |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckClass_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string sql = sql1 + sWhere+ " order by 代码"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_QCCheckClassList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "false!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "无数据"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | DAL.ClsGy_QCCheckClass_View oDeptHlp = new DAL.ClsGy_QCCheckClass_View(); |
| | | try |
| | | { |
| | | //判断是否有删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (oDeptHlp.GetInfoByID(HItemID)) |
| | | { |
| | | if (oDept.HavChildCodes(HItemID)) |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | string msg4 = sArray[2].ToString();//用户名 |
| | | string msg5 = sArray[3].ToString();//修改模块名称 |
| | | |
| | | //判断权限 |
| | | if (!DBUtility.ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | |
| | | string HRemark = list[0].HRemark; |
| | | string HStopflag = list[0].HStopflag; |
| | | string HUseFlag = list[0].HUseFlag; |
| | | |
| | | |
| | | //判断权限 |
| | | if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | { |