public ActionResult _AjaxList(GridCommand command, KanBanCardSearchModel searchModel)
 {
     SearchStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<KanBanCard>(searchStatementModel, command));
 }
        private SearchStatementModel PrepareSearchStatement(GridCommand command, KanBanCardSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "ka", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Flow", searchModel.Flow, "ka", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Item", searchModel.Item, "ka", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("LocationTo", searchModel.LocatoinTo, "ka", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Note", searchModel.Note, HqlStatementHelper.LikeMatchMode.Start, "ka", 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;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
 public ActionResult List(GridCommand command, KanBanCardSearchModel searchModel)
 {
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return View();
 }