Esempio n. 1
0
        // GET: MailServices/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MailService mailService = _mailServiceManager.FindById((int)id);

            if (mailService == null)
            {
                return(HttpNotFound());
            }
            MailServiceViewModel mailServiceViewModel = Mapper.Map <MailServiceViewModel>(mailService);

            return(View(mailServiceViewModel));
        }
Esempio n. 2
0
 // GET: MailServices/Details/5
 public ActionResult Details(int?id)
 {
     try
     {
         if (id == null)
         {
             return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
         }
         MailService mailService = _mailServiceManager.FindById((int)id);
         if (mailService == null)
         {
             return(HttpNotFound());
         }
         MailServiceViewModel mailServiceViewModel = Mapper.Map <MailServiceViewModel>(mailService);
         return(View(mailServiceViewModel));
     }
     catch (Exception ex)
     {
         ExceptionMessage(ex);
         return(View("Error", new HandleErrorInfo(ex, "MailServices", "Details")));
     }
 }