Beispiel #1
0
 /// <summary>
 /// 构造总数查询条件
 /// </summary>
 private static void BuildSelectCount <T>(ISelectBuilder <T> selector, RoleQueryRequeest requeest)
 {
     if (requeest.Status.HasValue)
     {
         selector.AndWhere("br.Status=@Status").Parameter("Status", requeest.Status);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 构造数据查询条件
 /// </summary>
 private static void BuildSelectRow <T>(ISelectBuilder <T> selector, RoleQueryRequeest requeest)
 {
     if (requeest.Status.HasValue)
     {
         selector.AndWhere("br.Status=@Status").Parameter("Status", requeest.Status);
     }
     if (!string.IsNullOrEmpty(requeest.OrderBy))
     {
         selector.OrderBy(requeest.OrderBy);
     }
     if (requeest.CurrentPageIndex.HasValue && requeest.PageSize.HasValue)
     {
         selector.Paging(requeest.CurrentPageIndex.Value, requeest.PageSize.Value);
     }
 }