public List <ManagerRole> GetListByCondition(ManagerRoleRequestModel model) { string conditions = "where IsDelete=0 ";//未删除的 if (!model.Key.IsNullOrWhiteSpace()) { conditions += $"and RoleName like '%{model.Key}%'"; } return(_repository.GetList(conditions).ToList()); }
public async Task <List <ManagerRole> > GetListByConditionAsync(ManagerRoleRequestModel model) { string conditions = $"where IsDelete=0 ";//未删除的 if (!model.Key.IsNullOrWhiteSpace()) { conditions += $"and RoleName like '%'+@Key+'%'"; } return((await _repository.GetListAsync(conditions, new { Key = model.Key, })).AsList()); }
/// <summary> /// 根据查询条件获取数据 /// </summary> /// <param name="model">查询实体</param> /// <returns></returns> public TableDataModel LoadData(ManagerRoleRequestModel model) { string conditions = "where IsDelete=0 ";//未删除的 if (!model.Key.IsNullOrWhiteSpace()) { conditions += $"and RoleName like '%{model.Key}%'"; } return(new TableDataModel { count = _repository.RecordCount(conditions), data = _repository.GetListPaged(model.Page, model.Limit, conditions, "Id desc"), }); }
/// <summary> /// 根据查询条件获取数据 /// </summary> /// <param name="model">查询实体</param> /// <returns></returns> public async Task <TableDataModel> LoadDataAsync(ManagerRoleRequestModel model) { string conditions = "where IsDelete=0 ";//未删除的 if (!model.Key.IsNullOrWhiteSpace()) { conditions += "and RoleName like '%'+@Key+'%'"; } return(new TableDataModel { count = await _repository.RecordCountAsync(conditions, new { Key = model.Key, }), data = await _repository.GetListPagedAsync(model.Page, model.Limit, conditions, "Id desc", new { Key = model.Key, }), }); }
public string LoadData([FromQuery] ManagerRoleRequestModel model) { return(JsonHelper.ObjectToJSON(_service.LoadData(model))); }
public async Task <string> LoadDataAsync([FromQuery] ManagerRoleRequestModel model) { return(JsonHelper.ObjectToJSON(await _service.LoadDataAsync(model))); }
public TableDataModel LoadData(ManagerRoleRequestModel model) { throw new NotImplementedException(); }
public List <managerrole> GetListByCondition(ManagerRoleRequestModel model) { throw new NotImplementedException(); }