private void trwTrials_DoubleClick(object sender, EventArgs e)
 {
     if (trwTrials.SelectedNode is SeriesTreeNode)
     {
         SeriesTreeNode stn = (SeriesTreeNode)trwTrials.SelectedNode;
         SeriesEditor   se  = new SeriesEditor(stn.Seria);
         Session.Instance.CurrentSeriaId = stn.Seria.Id;
         se.Show();
     }
 }
 private void miEditSeries_Click(object sender, EventArgs e)
 {
     if (trwTrials.SelectedNode is SeriesTreeNode)
     {
         SeriesTreeNode stn = (SeriesTreeNode)trwTrials.SelectedNode;
         EnableForm(false);
         AddSeriesForm asf = new AddSeriesForm(stn.Seria);
         asf.ShowDialog();
         Session.Instance.CurrentTrial.Refresh();
         LoadTrialsTreeView();
         EnableForm(true);
     }
 }
 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);
     }
 }