Пример #1
0
        /// <summary>
        /// Search Statement
        /// </summary>
        /// <param name="command">Telerik GridCommand</param>
        /// <param name="itemRefsearchModel">ItemRef Search Model</param>
        /// <param name="id">ItemRef id</param>
        /// <returns>return Search Statement</returns>
        private SearchStatementModel ItemRefPrepareSearchStatement(GridCommand command, ItemRefSearchModel itemRefsearchModel, string id)
        {
            string whereStatement = " where i.Item='" + id + "'";

            IList<object> param = new List<object>();

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

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

            return searchStatementModel;
        }
Пример #2
0
 public ActionResult _AjaxItemReferenceList(GridCommand command, ItemRefSearchModel itemRefsearchModel, string itemCode)
 {
     SearchStatementModel searchStatementModel = this.ItemRefPrepareSearchStatement(command, itemRefsearchModel, itemCode);
     return PartialView(GetAjaxPageData<ItemReference>(searchStatementModel, command));
 }
Пример #3
0
        public ActionResult ItemRefResult(GridCommand command, ItemRefSearchModel itemRefsearchModel, string id)
        {

            ViewBag.ItemCode = id;
            ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
            return PartialView();
        }
Пример #4
0
        /// <summary>
        /// Search Statement
        /// </summary>
        /// <param name="command">Telerik GridCommand</param>
        /// <param name="itemRefsearchModel">ItemRef Search Model</param>
        /// <param name="id">ItemRef id</param>
        /// <returns>return Search Statement</returns>
        private SearchStatementModel ItemRefPrepareSearchStatement(GridCommand command, ItemRefSearchModel itemRefsearchModel, string id)
        {
            string whereStatement = " where i.Item='" + id + "'";

            IList <object> param = new List <object>();

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

            SearchStatementModel searchStatementModel = new SearchStatementModel();

            searchStatementModel.SelectCountStatement = selectItemRefCountStatement;
            searchStatementModel.SelectStatement      = selectItemRefStatement;
            searchStatementModel.WhereStatement       = whereStatement;
            searchStatementModel.SortingStatement     = sortingStatement;
            searchStatementModel.Parameters           = param.ToArray <object>();

            return(searchStatementModel);
        }
Пример #5
0
        public ActionResult _AjaxItemReferenceList(GridCommand command, ItemRefSearchModel itemRefsearchModel, string itemCode)
        {
            SearchStatementModel searchStatementModel = this.ItemRefPrepareSearchStatement(command, itemRefsearchModel, itemCode);

            return(PartialView(GetAjaxPageData <ItemReference>(searchStatementModel, command)));
        }
Пример #6
0
 public ActionResult ItemRefResult(GridCommand command, ItemRefSearchModel itemRefsearchModel, string id)
 {
     ViewBag.ItemCode = id;
     ViewBag.PageSize = base.ProcessPageSize(command.PageSize);
     return(PartialView());
 }