| | |
| | | |
| | | [Route("Gy_EquipType/GetList")] |
| | | [HttpGet] |
| | | public object GetList(string sWhere) |
| | | public object GetList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_EquipFileType where 1=1 " + sWhere, "Gy_EquipFileType"); |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipTypeList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_EquipFileType where 1=1 " + sWhere+ " order by HItemID ", "Gy_EquipFileType"); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "查询数据异常,请与管理员联系!"; |
| | | objJsonResult.Message = "无记录,请与管理员联系!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | #region [设备分类删除功能] |
| | | [Route("Gy_EquipType/Delete_EquipType")] |
| | | [HttpGet] |
| | | public object Delete_EquipType(string HItemID) |
| | | public object Delete_EquipType(string HItemID,string user) |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_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); |
| | |
| | | DLL.ClsGy_EquipTypeBill oBill = new DLL.ClsGy_EquipTypeBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.RunProc("Delete From Gy_EquipFileType where HItemID=" + lngBillKey); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_EquipType_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //反序列化 |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Models.ClsGy_EquipFileType> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_EquipFileType>>(msg2); |