示例#1
0
        public PartialViewResult GetProviders(string searchString, int sortType)
        {
            PersonSort sort = TempData["sort"] as PersonSort;

            TempData.Keep();
            if (searchString != "`")
            {
                sort.SearchString = searchString;
            }
            sort.GetSort(sortType);
            TempData["sort"] = sort;
            TempData.Keep();
            List <ProviderView> providers = new List <ProviderView>();

            if (!String.IsNullOrEmpty(sort.SearchString))
            {
                foreach (var p in serviceProviders.Sort(serviceProviders.ProviderSearch(sort.SearchString), sort.Sort, sort.GetOrder()))
                {
                    providers.Add(new ProviderView(p));
                }
            }
            else
            {
                foreach (var p in serviceProviders.Sort(serviceProviders.GetProviders(), sort.Sort, sort.GetOrder()))
                {
                    providers.Add(new ProviderView(p));
                }
            }
            return(PartialView(providers));
        }
示例#2
0
        // GET: SupplyViews/Create
        public ActionResult Create()
        {
            SupplyEdit supplyEdit = new SupplyEdit(serviceProducts.GetProducts(), serviceProviders.GetProviders());

            return(View(supplyEdit));
        }