/// <summary>
 /// Search Statement
 /// </summary>
 /// <param name="command">Telerik GridCommand</param>
 /// <param name="searchModel">PriceListDetail Search Model</param>
 /// <param name="locationCode">PriceList Code</param>
 /// <returns>Search Statement</returns>
 private SearchStatementModel LocationAreaPrepareSearchStatement(GridCommand command, PriceListDetailSearchModel searchModel, string priceListDetail)
 {
     string whereLocationStatement = "where p.PriceList = '" + priceListDetail + "'";
     IList<object> param = new List<object>();
     HqlStatementHelper.AddEqStatement("Item", searchModel.Item, "p", ref whereLocationStatement, param);
     string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
     SearchStatementModel searchStatementModel = new SearchStatementModel();
     searchStatementModel.SelectCountStatement = priceListDetailSelectCountStatement;
     searchStatementModel.SelectStatement = priceListDetailSelectStatement;
     searchStatementModel.WhereStatement = whereLocationStatement;
     searchStatementModel.SortingStatement = sortingStatement;
     searchStatementModel.Parameters = param.ToArray<object>();
     return searchStatementModel;
 }
        public ActionResult _PriceListDetailList(GridCommand command, PriceListDetailSearchModel searchModel, string priceListCode)
        {
            ViewBag.LocationCode = priceListCode;

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

            return PartialView();
        }
        public ActionResult _AjaxPriceListDetailList(GridCommand command, PriceListDetailSearchModel searchModel, string priceListCode)
        {
            SearchStatementModel searchStatementModel = this.LocationAreaPrepareSearchStatement(command, searchModel, priceListCode);
            GridModel<PriceListDetail> priceListDetailList = GetAjaxPageData<PriceListDetail>(searchStatementModel, command);
            foreach (var priceList in priceListDetailList.Data)
            {
                if (priceList.PriceList != null)
                {
                    priceList.PriceListCode = priceList.PriceList.Code;
                }
                priceList.ItemDesc = this.itemMgr.GetCacheItem(priceList.Item).Description;
            }

            return PartialView(priceListDetailList);
        }
        public ActionResult _AjaxPriceListDetailList(GridCommand command, PriceListDetailSearchModel searchModel, string priceListCode)
        {
            SearchStatementModel searchStatementModel = this.LocationAreaPrepareSearchStatement(command, searchModel, priceListCode);
            GridModel<TransportPriceListDetail> priceListDetailList = GetAjaxPageData<TransportPriceListDetail>(searchStatementModel, command);

            return PartialView(priceListDetailList);
        }