示例#1
0
 public IActionResult AddPersonalTraining()
 {
     ViewData["Trainers"]   = GetTrainerList();
     ViewData["DayOfWeeks"] = DayOfWeeks;
     ViewData["TimeRanges"] = TimeList.Select(x => new SelectListItem {
         Text = x.ToString(), Value = x.ToString()
     });
     return(View());
 }
示例#2
0
        public IActionResult RequestAbonement()
        {
            var currentClient = context.Client.Single(x => x.Email == User.Identity.Name);

            ViewData["MyRequests"] = context.RequestAbonement.Where(x => x.IdClient == currentClient.Id).ToList();
            ViewData["TermList"]   = TermList.Select(x => new SelectListItem {
                Text = x.ToString(), Value = x.ToString()
            });
            ViewData["TimeList"] = TimeList.Select(x => new SelectListItem {
                Text = x.ToString(@"hh\:mm"), Value = x.ToString()
            });

            return(View(Roles.Client));
        }