Esempio n. 1
0
 public ActionResult Delete(Guid id)
 {
     if (id == Guid.Empty)
     {
         throw new HttpRequestValidationException();
     }
     try
     {
         _SendmailSvc.Delete(id);
         _SendmailSvc.CommitChanges();
         Messages.AddFlashMessage("Xóa thành công!");
         log.Info("Delete Email by: " + HttpContext.User.Identity.Name);
     }
     catch (Exception ex)
     {
         log.Error(" Delete -" + ex);
         Messages.AddErrorFlashMessage("Có lỗi xảy ra, vui lòng thực hiện lại!");
     }
     return(RedirectToAction("Index"));
 }