Ejemplo n.º 1
0
        public ActionResult _AjaxRoutingDetailList(GridCommand command, RoutingDetailSearchModel searchModel)
        {

            SearchStatementModel searchStatementModel = this.RoutingDetailPrepareSearchStatement(command, searchModel, searchModel.routingMasterCode);
            return PartialView(GetAjaxPageData<RoutingDetail>(searchStatementModel, command));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Search Statement
        /// </summary>
        /// <param name="command">Telerik GridCommand</param>
        /// <param name="searchModel">RoutingDetail Search Model</param>
        /// <param name="routingMasterCode">routingMaster Code</param>
        /// <returns>Search Statement</returns>
        private SearchStatementModel RoutingDetailPrepareSearchStatement(GridCommand command, RoutingDetailSearchModel searchModel, string routingMasterCode)
        {
            string whereStatement = "where r.Routing = '" + routingMasterCode + "'";
            IList<object> param = new List<object>();
            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "TimeUnitDescription")
                {
                    command.SortDescriptors[0].Member = "TimeUnit";
                }
            }

            HqlStatementHelper.AddEqStatement("Operation", searchModel.Operation, "r", ref whereStatement, param);
            
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = routingDetailSelectCountStatement;
            searchStatementModel.SelectStatement = routingDetailSelectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();
            return searchStatementModel;
        }
Ejemplo n.º 3
0
        public ActionResult RoutingDetailResult(GridCommand command, RoutingDetailSearchModel searchModel)
        {

            SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);
            ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
            return PartialView();
        }