示例#1
0
 /// <summary>
 /// Search Statement
 /// </summary>
 /// <param name="command">Telerik GridCommand</param>
 /// <param name="searchModel">LocationArea Search Model</param>
 /// <param name="locationCode">location Code</param>
 /// <returns>Search Statement</returns>
 private SearchStatementModel LocationAreaPrepareSearchStatement(GridCommand command, LocationAreaSearchModel searchModel, string locationCode)
 {
     string whereLocationStatement = "where l.Location = '" + locationCode + "'";
     IList<object> param = new List<object>();
     HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "l", ref whereLocationStatement, param);
     HqlStatementHelper.AddLikeStatement("Name", searchModel.Name, HqlStatementHelper.LikeMatchMode.Start, "l", ref whereLocationStatement, param);
     string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
     SearchStatementModel searchStatementModel = new SearchStatementModel();
     searchStatementModel.SelectCountStatement = locationAreaselectCountStatement;
     searchStatementModel.SelectStatement = locationAreaselectStatement;
     searchStatementModel.WhereStatement = whereLocationStatement;
     searchStatementModel.SortingStatement = sortingStatement;
     searchStatementModel.Parameters = param.ToArray<object>();
     return searchStatementModel;
 }
示例#2
0
 public ActionResult _LocationAreaList(GridCommand command, LocationAreaSearchModel searchModel, string locationCode)
 {
     ViewBag.LocationCode = locationCode;
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     SearchCacheModel searchCacheModel = ProcessSearchModel(command, searchModel);
     SearchStatementModel searchStatementModel = this.LocationAreaPrepareSearchStatement(command, (LocationAreaSearchModel)searchCacheModel.SearchObject, locationCode);
     return PartialView(GetPageData<LocationArea>(searchStatementModel, command));
 }
示例#3
0
 public ActionResult _AjaxLocationAreaList(GridCommand command, LocationAreaSearchModel searchModel, string locationCode)
 {
     SearchStatementModel searchStatementModel = this.LocationAreaPrepareSearchStatement(command, searchModel, locationCode);
     return PartialView(GetAjaxPageData<LocationArea>(searchStatementModel, command));
 }
 public ActionResult _AjaxLocationAreaList(GridCommand command, LocationAreaSearchModel searchModel, string locationCode)
 {
     string replaceFrom = "_AjaxLocationAreaList";
     string replaceTo = "_LocationAreaList/";
     this.GetCommand(ref command, searchModel, replaceFrom, replaceTo);
     SearchStatementModel searchStatementModel = this.LocationAreaPrepareSearchStatement(command, searchModel, locationCode);
     return PartialView(GetAjaxPageData<LocationArea>(searchStatementModel, command));
 }