public ActionResult _AjaxMrpFlowDetailList(GridCommand command, MrpFlowDetailSearchModel searchModel)
 {
     if (searchModel.SnapTime == DateTime.MinValue)
     {
         return PartialView(new GridModel(new List<MrpFlowDetail>()));
     }
     SearchStatementModel searchStatementModel = this.PrepareMrpFlowDetailSearchStatement(command, searchModel);
     return PartialView(GetAjaxPageData<MrpFlowDetail>(searchStatementModel, command));
 }
        private SearchStatementModel PrepareMrpFlowDetailSearchStatement(GridCommand command, MrpFlowDetailSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();
            HqlStatementHelper.AddEqStatement("LocationFrom", searchModel.LocationFrom, "m", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("LocationTo", searchModel.LocationTo, "m", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("PartyFrom", searchModel.PartyFrom, "m", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("PartyTo", searchModel.PartyTo, "m", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Item", searchModel.Item, "m", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Flow", searchModel.Flow, "m", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("SnapTime", searchModel.SnapTime, "m", ref whereStatement, param);


            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);


            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountMrpFlowDetailStatement;
            searchStatementModel.SelectStatement = selectMrpFlowDetailStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
 public ActionResult MrpFlowDetailList(GridCommand command, MrpFlowDetailSearchModel searchModel)
 {
     SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     if (searchModel.SnapTime == DateTime.MinValue)
     {
         SaveErrorMessage(Resources.EXT.ControllerLan.Con_SnapTimeCanNotBeEmpty);
     }
     return View();
 }