| | |
| | | |
| | | [Route("Gy_EquipFileMain/GetList")] |
| | | [HttpGet] |
| | | public object GetList(string sWhere) |
| | | public object GetList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameSelect, 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有查看权限"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipFileList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查看权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select *from h_v_Gy_EquipFileMainList " + sWhere + "order by 日期 desc", "h_v_Gy_EquipFileMainList"); |
| | |
| | | #region [设备档案删除功能] |
| | | [Route("Gy_EquipFileMain/Delete_EquipFile")] |
| | | [HttpGet] |
| | | public object Delete_EquipFile(string HItemID) |
| | | public object Delete_EquipFile(string HItemID,string user) |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string s = ""; |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HItemID); |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Models.ClsGy_EquipFileMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_EquipFileMain>>(msg2); |