Esempio n. 1
0
 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(), "*");
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public abstract DbQueryResult GetManagers(ManagerQuery query);
Esempio n. 4
0
 public static DbQueryResult GetManagers(ManagerQuery query)
 {
     return StoreProvider.Instance().GetManagers(query);
 }
Esempio n. 5
0
 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(), "*");
 }
Esempio n. 6
0
 public static DbQueryResult GetManagers(ManagerQuery query)
 {
     return new MessageDao().GetManagers(query);
 }