예제 #1
0
 public ActionResult _AjaxList(GridCommand command, PickResultSearchModel searchModel)
 {
     SearchStatementModel searchStatementModel = PrepareSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<PickResult>(searchStatementModel, command));
 }
예제 #2
0
        private SearchStatementModel PrepareSearchStatement(GridCommand command, PickResultSearchModel searchModel)
        {
            string whereStatement = string.Empty;
            IList<object> param = new List<object>();
            HqlStatementHelper.AddLikeStatement("OrderNo", searchModel.OrderNo, HqlStatementHelper.LikeMatchMode.Start, "p", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Location", searchModel.Location,  "p", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Item", searchModel.Item, "p", ref whereStatement, param);

            if (searchModel.DateFrom != null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.DateFrom, "p", ref whereStatement, param);
            }
            else if (searchModel.DateTo != null )
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.DateTo, "p", 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;
        }
예제 #3
0
 public ActionResult List(GridCommand command, PickResultSearchModel searchModel)
 {
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return View();
 }