Ejemplo n.º 1
0
        public ActionResult Wizard(int id)
        {
            var discipline = DisciplineHandler.Select(id);
            var people     = PersonHandler.GetAll();

            var model = new InsertTimesByDisciplineModel
            {
                ControllerName = "Disciplines",
                Title          = "Disciplines",
                Discipline     = discipline,
                People         = people
            };

            ViewBag.Title = "Wizard, magic n'shit";
            return(View("~/Views/DbObjViews/Times/CreateWizard.cshtml", model));
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            PersonHandler handler = new PersonHandler();
            HomeModel     model   = new HomeModel();

            List <Person>         list  = handler.GetAll();
            List <SelectListItem> items = new List <SelectListItem>();

            foreach (Person p in list)
            {
                items.Add(new SelectListItem()
                {
                    Text = p.Firstname + " " + p.Lastname, Value = p.PersonId.ToString()
                });
            }

            model.Persons = items;

            return(View(model));
        }