private void btndeletemedia_Click(object sender, EventArgs e) { MediaLogic ml = new MediaLogic(); int result = 0; result = ml.DeleteSelectedMedia(MediadataGridView.SelectedRows[0].Cells[0].Value); //result = ml.DeleteSelectedMedia(selectedMedia.mediaID); // selectedmedia = null; MessageBox.Show(result.ToString() + " media delete."); MaintainMedia_Load(sender, e); }