/// <summary> /// 删除 /// </summary> /// <param name="oid">主键</param> /// <returns></returns> public int Delete(Guid oid) { RoleToPermission entity = new RoleToPermission(); entity.RoleToPermissionGuid = oid; return(entity.Delete()); }
/// <summary> /// 查询信息 /// </summary> /// <param name="oid">主键</param> /// <returns></returns> public RoleToPermission Retrieve(Guid oid) { RoleToPermission entity = new RoleToPermission(); entity.RoleToPermissionGuid = oid; return((RoleToPermission)entity.Retrieve()); }
public AjaxResult DeleteRolePermission(RoleToPermission entity) { bll.DeleteRolePermission(entity); return(new AjaxResult(ResultStatus.OK) { Status = ResultStatus.OK }); }
public AjaxResult Delete(RoleToPermission entity) { entity.Delete(); return(new AjaxResult(ResultStatus.OK) { Status = ResultStatus.OK }); }
/// <summary> /// 更新 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public AjaxResult Update(RoleToPermission entity) { AjaxResult res = new AjaxResult(ResultStatus.OK); entity.Valid(); if (entity.Update() == 1) { res.Status = ResultStatus.OK; } else { res.Status = ResultStatus.NO; res.Message = "更新失败!"; } return(res); }
/// <summary> /// 插入 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public AjaxResult Insert(RoleToPermission entity) { AjaxResult res = new AjaxResult(ResultStatus.OK); entity.Valid(); entity.RoleToPermissionGuid = (entity.RoleToPermissionGuid == Guid.Empty ? Guid.NewGuid() : entity.RoleToPermissionGuid); if (entity.Insert() == 1) { res.Status = ResultStatus.OK; } else { res.Status = ResultStatus.NO; res.Message = "新增失败!"; } return(res); }
/// <summary> /// 删除 /// </summary> /// <param name="entity">实体</param> /// <returns></returns> public int DeleteRolePermission(RoleToPermission entity) { return(entity.Delete(string.Format("RoleGuid = '{0}' AND ActionGuid = '{1}'", entity.RoleGuid, entity.ActionGuid))); }
public string Update(RoleToPermission entity) { return(entity.Update().ToString()); }
public string Insert(RoleToPermission entity) { return(bll.Insert(entity).ToString()); }