/// <summary> /// 根据Id删除数据 /// </summary> /// <param name="id"></param> /// <returns></returns> public ResultEntity <int> DeleteDataById(int id) { ResultEntity <int> result; try { var repResult = dal.DeleteDataById <Users>(id); if (repResult) { result = new ResultEntity <int>(true, ConstantDefine.TipDelSuccess, 1); } else { result = new ResultEntity <int>(ConstantDefine.TipDelFail); } } catch (Exception ex) { Loger.LogErr(ex); result = new ResultEntity <int>(ex.Message); } return(result); }