//public ActionResult MarketJobsListPartial(int id)
        //{
        //    ViewBag.MarketJobStatus = id;
        //    var results = _marketServices.GetAllValidMarketJobs(CurrentTenantId, (MarketJobStatusEnum)id);
        //    return PartialView("~/Views/MarketJob/_GridPartial.cshtml", results);
        //}


        public ActionResult MarketJobsListPartial()
        {
            int id = int.Parse(!string.IsNullOrEmpty(Request.Params["id"]) ? Request.Params["id"] : "0");

            ViewBag.MarketJobStatus = id;
            var viewModel = GridViewExtension.GetViewModel("_GridPartial");

            if (viewModel == null)
            {
                viewModel = MarketListCustomBinding.CreateMarketGridViewModel();
            }

            return(_MarketGridViewsJobsGridActionCore(viewModel));
        }
        public ActionResult _MarketGridViewsJobsGridActionCore(GridViewModel gridViewModel)
        {
            gridViewModel.ProcessCustomBinding(
                new GridViewCustomBindingGetDataRowCountHandler(args =>
            {
                MarketListCustomBinding.MarketGetDataRowCount(args, CurrentTenantId);
            }),

                new GridViewCustomBindingGetDataHandler(args =>
            {
                MarketListCustomBinding.MarketGetData(args, CurrentTenantId, CurrentWarehouseId);
            })
                );
            return(PartialView("~/Views/MarketJob/_GridPartial.cshtml", gridViewModel));
        }