예제 #1
0
 public ActionResult Delete(ReadNewspaperVM readNewspaperVM)
 {
     try
     {
         _newspaperLogic.DeleteNewspaperById(readNewspaperVM.Id);
         return(RedirectToAction("Index", "PrintEdition"));
     }
     catch (Exception ex)
     {
         Logger.Error("Something goes wrong at Delet method at NewsppaerController " + ex.Message);
         return(View());
     }
 }
예제 #2
0
        public ActionResult Edit(int id)
        {
            ReadNewspaperVM readNewspaperVM = null;

            try
            {
                readNewspaperVM = _mapper.Map <ReadNewspaperVM>(_newspaperLogic.GetNewspaperById(id));
                return(View(readNewspaperVM));
            }
            catch (Exception ex)
            {
                Logger.Error("Something goes wrong at Edit method of NewspaperController: " + ex.Message);
                return(RedirectToAction("Index", "PrintEdition"));
            }
        }
예제 #3
0
        public ActionResult Delete(int id)
        {
            ReadNewspaperVM readNewspaperVM = null;

            try
            {
                readNewspaperVM = _mapper.Map <ReadNewspaperVM>(_newspaperLogic.GetNewspaperById(id));
                return(View(readNewspaperVM));
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message);
                return(View("Index", "PrintEdition"));
            }
        }