/// <summary>
 /// the  Prepare Search Statements  for  PermissionGroup by  Some  Condition
 /// </summary>
 /// <param name="command">Grid Command</param>
 /// <param name="searchModel">PermissionGroup SearchModel</param>
 /// <returns>searchStatementModel  of  PermissionGroup </returns>
 private SearchStatementModel PrepareSearchStatement(GridCommand command, PermissionGroupSearchModel searchModel)
 {
     string whereStatement = string.Empty;
     IList<object> param = new List<object>();
     HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "u", ref whereStatement, param);
     string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
     SearchStatementModel searchStatementModel = new SearchStatementModel();
     searchStatementModel.SelectCountStatement = selectCountStatement;
     searchStatementModel.SelectStatement = selectStatement;
     searchStatementModel.WhereStatement = whereStatement;
     searchStatementModel.SortingStatement = sortingStatement;
     if (string.IsNullOrWhiteSpace(sortingStatement))
     {
         searchStatementModel.SortingStatement = " order by u.Code ";
     }
     searchStatementModel.Parameters = param.ToArray<object>();
     return searchStatementModel;
 }
 public ActionResult _AjaxList(GridCommand command, PermissionGroupSearchModel searchModel)
 {
     string replaceFrom = "_AjaxList";
     string replaceTo = "List";
     this.GetCommand(ref command, searchModel, replaceFrom, replaceTo);
     SearchStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<PermissionGroup>(searchStatementModel, command));
 }
 public ActionResult List(GridCommand command, PermissionGroupSearchModel searchModel)
 {
     
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     if (searchCacheModel.isBack == true)
     {
         ViewBag.Page = searchCacheModel.Command.Page==0 ? 1 : searchCacheModel.Command.Page;
     }
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return View();
 }
 public ActionResult _AjaxList(GridCommand command, PermissionGroupSearchModel searchModel)
 {
     SearchStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<PermissionGroup>(searchStatementModel, command));
 }
 public ActionResult List(GridCommand command, PermissionGroupSearchModel searchModel)
 {
     return View();
 }
 public ActionResult List(GridCommand command, PermissionGroupSearchModel searchModel)
 {
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return View();
 }