public ActionResult Delete(int id) { _entriesRepository.DeleteEntry(id); SetTempDataMessage("Your data was successfully deleted!"); return(RedirectToAction(nameof(Index))); }
public ActionResult Delete(int id) { _entriesRepository.DeleteEntry(id); TempData["Message"] = "Entry succesfully deleted"; return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { //delet entry, _entriesRepository.DeleteEntry(id); //redirect user to the entries list page return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { //TODO Delete the entry _entriesRepository.DeleteEntry(id); TempData["Message"] = "Your entry was successfully deleted!"; return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { //Delete the entry from the entriesrepository _entriesRepository.DeleteEntry(id); //redirect to the list page TempData["Message"] = "Your entry was successfully deleted"; return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { //delete _entriesRepository.DeleteEntry(id); TempData["Message"] = "La entrada fue exitosamente eliminada"; //return to index return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { _entriesRepository.DeleteEntry(id); TempData["Message"] = "Your GAIN was removed! Such a sad day :("; return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { _entriesRepository.DeleteEntry(id); TempData["Message"] = "Your entry was deleted successfully!"; return(RedirectToAction("index")); }
public ActionResult Delete(int id) { // TODO Delete the entry. _entriesRepository.DeleteEntry(id); TempData["Message"] = "Your entry was successfully deleted!"; // Redirect the user to the "Entries" list page. return(RedirectToAction("index")); }
public ActionResult Delete(int id) { // Delete the entry _entriesRepository.DeleteEntry(id); TempData["Message"] = "Your entry was deleted."; // Redirect to the entries list page return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { // To do - Delete the entry _entriesRepository.DeleteEntry(id); TempData["Message"] = "Your entry was successfully Deleted"; // todo - Redirect to the "Entries" list page return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { /* Delete the entry */ _entriesRepository.DeleteEntry(id); /* Confirmation message after an entry has being deleted */ TempData["Message"] = "Your entry was successfully deleted!"; /* Redirect to the "Entries" list page */ return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { // Delete the entry. _entriesRepository.DeleteEntry(id); // Send a temporary message to confirm the action TempData["Message"] = "Your entry was successfully deleted!"; // redirect to the "Entries" list page. return(RedirectToAction("Index")); }
// Home page public ActionResult ViewDelete(int?id) { // delete the entry if an id value is provided if (id != null) { _entriesRepository.DeleteEntry(id.GetValueOrDefault(0)); } // get the list entries for the index page list List <Entry> entries = _entriesRepository.GetEntries(); // delete entry if id is provided return(View(entries)); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } _entriesRepository.DeleteEntry((int)id); TempData["Message"] = "The Entry was deleted with sucess!"; return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { _entriesRepository.DeleteEntry(id); return(RedirectToAction("Index")); }
public ActionResult Delete(Entry entryToDelete) { _entriesRepository.DeleteEntry(entryToDelete.Id); TempData["Message"] = "your entry was deleted successfully!"; return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { _entriesRepository.DeleteEntry(id); TempData["Message"] = "The entry has been deleted."; return(RedirectToAction("Index")); }
public ActionResult Delete(Entry entry) { _entriesRepository.DeleteEntry(entry); TempData["Message"] = "Your entry was successfully deleted!"; return(RedirectToAction("Index")); }
public ActionResult Delete(Entry entry) { _entriesRepository.DeleteEntry(entry.Id); TempData["SuccessMessage"] = "Undesirable entry successfully deleted!"; return(RedirectToAction("Index")); }