コード例 #1
0
 private void button1newOprosnik_Click(object sender, EventArgs e)
 {
     try
     {
         editOprosnik ed = new editOprosnik(new oprosnik());
         ed.ShowDialog();
         if (ed.DialogResult == DialogResult.OK) MessageBox.Show("Сохранено");
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         okFileOprosnikOpen = false;
         openFileDialog1.ShowDialog();
         if (okFileOprosnikOpen)
         {
             oprosnik temp = new oprosnik();
             temp.Load(openFileDialog1.FileName);
             editOprosnik ed = new editOprosnik(temp);
             ed.ShowDialog();
         }
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }