Delete data
Anonymous
plain_text
12/24/2022 7:20 AM
884 B
23
Indexable
var result =
MessageBox.Show(
"Are you sure to remove this student data? Please note that this action cannot be undone. Continue?",
"Remove", MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result != MessageBoxResult.Yes) return;
await Conopen();
Sqlcmd.Parameters.Clear();
Strsql =
"Delete from tbl_students where LRN='" + SelectedStudentId + "'";
Sqlcmd.Connection = Cnn;
Sqlcmd.CommandText = Strsql;
Sqlcmd.ExecuteNonQuery();
Sqlcmd.Dispose();
Cnn.Close();Editor is loading...