Ejemplo n.º 1
0
 private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     NewModelForm form = new NewModelForm();
     if (form.ShowDialog() == DialogResult.OK)
     {
         UpdateData();
     }
 }
Ejemplo n.º 2
0
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                ModelCar modelCar = dataGridView1.SelectedRows[0].DataBoundItem as ModelCar;

                NewModelForm form = new NewModelForm(modelCar);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    UpdateData();
                }
            }
        }