Beispiel #1
0
        private void NewAnalysisMenuItem_Click(object sender, RoutedEventArgs e)
        {
            List <Sample> lst   = lbSamples.SelectedItems.Cast <Sample>().ToList <Sample>();
            StringBuilder title = new StringBuilder("образцов №№ ");

            lst.ForEach(p => { title.Append(p.LabNumber); title.Append(" "); });
            SaltAnalysisDlg saltADlg = new SaltAnalysisDlg(lst);

            saltADlg.Title = "Новые данные анализов для " + ((lbSamples.SelectedItems.Count == 1) ?
                                                             "образца №" + ((Sample)lbSamples.SelectedItem).IDSample.ToString():
                                                             title.ToString());
            if (saltADlg.ShowDialog() == true)
            {   //Resample only if OK is pressed otherwise no new data are available
                FillData();
            }
        }
Beispiel #2
0
        private void EditCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            List <Sample> lst   = lbSamples.SelectedItems.Cast <Sample>().ToList <Sample>();
            StringBuilder title = new StringBuilder("образцов №№ ");

            lst.ForEach(p => { title.Append(p.LabNumber); title.Append(" "); });
            SaltAnalysisDlg saltADlg = new SaltAnalysisDlg(lst, "Edit");

            saltADlg.Title = "Редактирование данных анализов для " + ((lbSamples.SelectedItems.Count == 1) ?
                                                                      "образца №" + ((Sample)lbSamples.SelectedItem).IDSample.ToString() :
                                                                      title.ToString());
            if (saltADlg.ShowDialog() == true)
            {
            }
            //Resample in any case since user could have deleted all analyses and quitted by ESC
            FillData();
        }