Пример #1
0
        /* 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();
                }
            }
        }
Пример #2
0
 public IActionResult Sil(string Id)
 {
     userDb.DeleteWithId(Id);
     TempData["DeleteMessage"] = "Kullanıcı Başarıyla Silindi.";
     return(RedirectToAction("Index"));
 }
Пример #3
0
 public ActionResult Delete(Contact contact, FormCollection formCollection)
 {
     saklambacDb.DeleteWithId(contact.Id);
     return(RedirectToAction("Messages"));
 }
Пример #4
0
 public IActionResult MesajSil(string Id)
 {
     contactDb.DeleteWithId(Id);
     TempData["DeleteMessage"] = "Mesaj Başarıyla Silindi.";
     return(RedirectToAction("Mesajlar", "Yonetici"));
 }