private void delteacher_Click(object sender, EventArgs e) { var selectedItem = lbTeachers.SelectedItem as Teachers; if (selectedItem == null) { return; } DBUtils.DeleteTable(selectedItem.Name, "teacher", DBUtils.Teacherconn); Ref(); }
private void EditBtn_Click(object sender, EventArgs e) { var selectedItem = lbStudents.SelectedItem as Students; if (selectedItem == null) { return; } DBUtils.DeleteTable(selectedItem.Name); Ref(); }