Esempio n. 1
0
        // GET: Person
        public ActionResult Index()
        {
            PersonModel model = new PersonModel();

            model.PageSize = 4;

            List <PersonDBHandler> people = PersonDBHandler.GetPersonList();

            if (people != null)
            {
                model.TotalCount = people.Count();
                model.People     = people;
            }

            return(View(model));
        }
        // GET: Person
        public ActionResult Index()
        {
            PersonDBHandler PersonHandler = new PersonDBHandler(_configuration);

            return(View(PersonHandler.GetPersonList()));
        }
        // GET: Person/Delete/5
        public ActionResult Delete(int id)
        {
            PersonDBHandler PersonHandler = new PersonDBHandler(_configuration);

            return(View(PersonHandler.GetPersonList().Find(personmodel => personmodel.ID == id)));
        }
Esempio n. 4
0
        // GET: Person/Edit/5
        public ActionResult Edit(int id)
        {
            PersonDBHandler PersonHandler = new PersonDBHandler();

            return(View(PersonHandler.GetPersonList().Find(personmodel => personmodel.ID == id)));
        }