Delete data

 avatar
unknown
plain_text
3 years ago
661 B
8
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...