Exemple #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            var SympForm = new SymptomEditing();

            SympForm.Owner = this;
            SympForm.ShowDialog();
        }
Exemple #2
0
        private void buttonCorrect_Click(object sender, EventArgs e)
        {
            if (dataGridViewSymptoms.SelectedCells.Count > 0)
            {
                var i = dataGridViewSymptoms.SelectedCells[0].RowIndex;

                var SympForm = new SymptomEditing(
                    new Symptom(Convert.ToInt32(dataGridViewSymptoms.Rows[i].Cells[0].Value),
                                Convert.ToString(dataGridViewSymptoms.Rows[i].Cells[1].Value),
                                Convert.ToDouble(dataGridViewSymptoms.Rows[i].Cells[2].Value),
                                Convert.ToDouble(dataGridViewSymptoms.Rows[i].Cells[3].Value)));
                SympForm.Owner = this;
                SympForm.ShowDialog();
            }
            else
            {
                MessageBox.Show("Ничего не выделено для редактирования!", "Объект не выделен", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }