Exemplo n.º 1
0
        public ActionResult List(GridCommand command, SCMSupplierPlantSearchModel searchModel)
        {
            SearchCacheModel searchCacheModel = this.ProcessSearchModel(command, searchModel);

            ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
            return(View());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Search Statement
        /// </summary>
        /// <param name="command">GridCommand Telerik</param>
        /// <param name="searchModel">SCMSupplierPlant Search Model</param>
        /// <returns>Search Statement</returns>
        private SearchStatementModel PrepareSearchStatement(GridCommand command, SCMSupplierPlantSearchModel searchModel)
        {
            string         whereStatement = string.Empty;
            IList <object> param          = new List <object>();

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "u", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Description", searchModel.Description, HqlStatementHelper.LikeMatchMode.Start, "u", 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);
        }
Exemplo n.º 3
0
        public ActionResult _AjaxList(GridCommand command, SCMSupplierPlantSearchModel searchModel)
        {
            SearchStatementModel searchStatementModel = this.PrepareSearchStatement(command, searchModel);

            return(PartialView(GetAjaxPageData <SCMSupplierPlant>(searchStatementModel, command)));
        }