Exemple #1
0
        /*public IActionResult Index()
         * {
         *  return View();
         * }*/

        public async Task <IActionResult> GetEmploy()
        {
            var allEmploy = await _employRepository.GetAllEmploy();

            var sortedEmploy    = allEmploy.OrderBy(f => f.employer);
            var employViewModel = new EmployViewModel()
            {
                Employ = allEmploy.ToList(),
                Title  = "Our Most Entrusted Employers"
            };

            return(View(employViewModel));
        }
        // GET: HtmlHelper
        public ActionResult Index()
        {
            List <SelectListItem> list = new List <SelectListItem>();

            for (int i = 1; i < 21; i++)
            {
                SelectListItem item = new SelectListItem();
                item.Value    = i.ToString();
                item.Text     = i.ToString();
                item.Selected = false;
                list.Add(item);
            }
            EmployViewModel EVM = new EmployViewModel();

            EVM.empList = list;
            return(View(EVM));
        }
 public ActionResult GetResult(EmployViewModel model)
 {
     return(RedirectToAction("Index"));
 }