public ActionResult _AjaxList(GridCommand command, ProductLineMapSearchModel searchModel) { SearchStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel); return PartialView(GetAjaxPageData<ProductLineMap>(searchStatementModel, command)); }
/// <summary> /// Search Statement /// </summary> /// <param name="command">Telerik GridCommand</param> /// <param name="searchModel">RoutingMaster Search Model</param> /// <returns>Search Statement</returns> private SearchStatementModel PrepareSearchStatement(GridCommand command, ProductLineMapSearchModel searchModel) { string whereStatement = string.Empty; IList<object> param = new List<object>(); HqlStatementHelper.AddLikeStatement("SAPProductLine", searchModel.SAPProductLine, HqlStatementHelper.LikeMatchMode.Start, "r", ref whereStatement, param); HqlStatementHelper.AddEqStatement("ProductLine", searchModel.ProductLine, "r", 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, ProductLineMapSearchModel searchModel) { SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel); ViewBag.PageSize = base.ProcessPageSize(command.PageSize); return View(); }