private void miDeleteSeries_Click(object sender, EventArgs e) { if (trwTrials.SelectedNode is SeriesTreeNode) { SeriesTreeNode stn = (SeriesTreeNode)trwTrials.SelectedNode; EnableForm(false); if (Util.ShowQuestion("Are you sure want to delete this series and all its data?") == DialogResult.Yes) { SqlUtils.DeleteSeries(stn.Seria, Settings.Default.DBConnectionString); } Session.Instance.CurrentTrial.Refresh(); LoadTrialsTreeView(); EnableForm(true); } }