public ActionResult DeleteAssessment(int id) { string message; if (id > 0) { message = AssessmentService.Delete(id, User.Identity.Name); if (String.IsNullOrEmpty(message)) { TempData["Error"] = Messages.Deleted; return(RedirectToAction("Index")); } else { ViewData["Warning"] = message; } } else { ViewData["Warning"] = Messages.InvalidField; } return(View()); }
public void Delete(int id) { _service.Delete(id); }