Esempio n. 1
0
        public IActionResult Remove(int id)
        {
            var source = new SourceManager();
            var record = source.GetById(id);

            return(View(record));
        }
Esempio n. 2
0
        public IActionResult Delete(int id)
        {
            var         manager = new SourceManager();
            PersonModel model   = manager.GetById(id);

            return(View(model));
        }
Esempio n. 3
0
        public IActionResult Edit(int id)
        {
            var repo  = new SourceManager();
            var model = repo.GetById(id);


            return(View(model));
        }
Esempio n. 4
0
        public IActionResult Details(int id)
        {
            PersonModel person = new PersonModel();

            try
            {
                using SourceManager sourceManager = new SourceManager();
                person = sourceManager.GetById(id); //odczyt z bazy
            }
            catch (Exception)
            {
                TempData["Error"] = "Błąd bazy danych.";
                return(View("DataSourceErrorPage")); // wyświetl stronę błędu
            }
            return(View(person));
        }
Esempio n. 5
0
 public ActionResult Edit(int ID)
 {
     return(View(SourceManager.GetById(ID)));
 }
Esempio n. 6
0
        public IActionResult Remove(int id)
        {
            var getOne = SourceManager.GetById(id);

            return(View(getOne));
        }
Esempio n. 7
0
        public IActionResult Edit(int id)
        {
            var model = _repo.GetById(id);

            return(View(model));
        }