public ActionResult DetailList(GridCommand command, CustReportSearchModel searchModel)
 {
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return PartialView();
 }
 public ActionResult _AjaxDetList(GridCommand command, CustReportSearchModel searchModel)
 {
     SearchStatementModel searchStatementModel = this.PrepareDetSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<CustReportDetail>(searchStatementModel, command));
 }
        /// Det Search Statement
        private SearchStatementModel PrepareDetSearchStatement(GridCommand command, CustReportSearchModel searchModel)
        {
            string whereStatement = string.Empty;

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

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "i", ref whereStatement, param);
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (string.IsNullOrWhiteSpace(sortingStatement))
            {
                sortingStatement = " order by i.Code ";
            }

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectDetCountStatement;
            searchStatementModel.SelectStatement = selectDetStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();
            return searchStatementModel;
        }