/* The task of this method is to delete teacher by Id */ private void btnDeleteTeacher_Click(object sender, EventArgs e) { var result = MessageBox.Show("Do you want to delete this teacher ?", "Warning", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { if (txtId.Text.Length > 0) { teacherDb.DeleteWithId(txtId.Text); MessageBox.Show("Deleted This Teacher."); ShowAllTeachers(); ShowStatistics(); } } }
public IActionResult Sil(string Id) { userDb.DeleteWithId(Id); TempData["DeleteMessage"] = "Kullanıcı Başarıyla Silindi."; return(RedirectToAction("Index")); }
public ActionResult Delete(Contact contact, FormCollection formCollection) { saklambacDb.DeleteWithId(contact.Id); return(RedirectToAction("Messages")); }
public IActionResult MesajSil(string Id) { contactDb.DeleteWithId(Id); TempData["DeleteMessage"] = "Mesaj Başarıyla Silindi."; return(RedirectToAction("Mesajlar", "Yonetici")); }