コード例 #1
0
        //to direct to services selection page
        public IActionResult Index()
        {
            reqQuoteIndexVM vm = new reqQuoteIndexVM()
            {
                ServiceCategories = _reqQuoteRepo.GetAllCat().ToList(),
                Services          = _reqQuoteRepo.GetAllServices().OrderBy(a => a.CatID).ToList()
            };


            return(View(vm));
        }
コード例 #2
0
        public IActionResult SearchCompanies()
        {
            SearchCompVM vm = new SearchCompVM
            {
                ServiceCategories = _compServiceRepo.GetAllCat().ToList(),
                Services          = _compServiceRepo.GetAllServices().Select(s => new SelectListItem {
                    Value = s.ID.ToString(), Text = s.Title
                }).ToList()
            };

            return(View(vm));
        }