| | |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 用户关联用户删除 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Xt_User/Gy_UserByUserListDrop")] |
| | | [HttpGet] |
| | | public object DeltetGy_Material(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_UserByUser_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | ds = oCN.RunProcReturn("select * from Gy_UserByUserRelation where HItemID=" + HItemID, "Gy_UserByUserRelation"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCN.RollBack();//回滚事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有数据,无法删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | |
| | | oCN.RunProc("delete from Gy_UserByUserRelation where HItemID=" + HItemID); |
| | | |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* 数据删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack();//回滚事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 用关联物料获取信息 |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 用关联用户获取信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Gy_UserByUserEdit")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> Gy_UserByUserEdit(string HID) |
| | | { |
| | | var model = LuBaoSevice.Gy_UserByUserEdit(HID); |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报废原因 |
| | | /// </summary> |
| | | /// <returns></returns> |