public DbQueryResult GetManagers(ManagerQuery query) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("UserName LIKE '%{0}%'", DataHelper.CleanSearchString(query.Username)); if (query.RoleId != 0) { builder.AppendFormat(" AND RoleId = {0}", query.RoleId); } return DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "aspnet_Managers", "UserId", builder.ToString(), "*"); }
private ManagerQuery GetManagerQuery() { ManagerQuery query = new ManagerQuery(); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["Username"])) { query.Username = base.Server.UrlDecode(this.Page.Request.QueryString["Username"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["RoleId"])) { query.RoleId = int.Parse(this.Page.Request.QueryString["RoleId"]); } query.PageSize = this.pager.PageSize; query.PageIndex = this.pager.PageIndex; if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SortBy"])) { query.SortBy = this.Page.Request.QueryString["SortBy"]; } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SortOrder"])) { query.SortOrder = SortAction.Desc; } return query; }
public abstract DbQueryResult GetManagers(ManagerQuery query);
public static DbQueryResult GetManagers(ManagerQuery query) { return StoreProvider.Instance().GetManagers(query); }
public override DbQueryResult GetManagers(ManagerQuery query) { StringBuilder builder = new StringBuilder(); builder.AppendFormat("UserName LIKE '%{0}%'", DataHelper.CleanSearchString(query.Username)); if (query.RoleId != Guid.Empty) { builder.AppendFormat(" AND UserId IN (SELECT UserId FROM aspnet_UsersInRoles WHERE RoleId = '{0}')", query.RoleId); } return DataHelper.PagingByRownumber(query.PageIndex, query.PageSize, query.SortBy, query.SortOrder, query.IsCount, "vw_aspnet_Managers", "UserId", builder.ToString(), "*"); }
public static DbQueryResult GetManagers(ManagerQuery query) { return new MessageDao().GetManagers(query); }