Esempio n. 1
0
 private void button4_Click(object sender, EventArgs e)
 {
     label4.Text = "Zapisano zmiany!";
     saved       = true;
     dc.saveData();
     app.refreshData();
 }
Esempio n. 2
0
 private void companyToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!saved)
     {
         DialogResult dr = MessageBox.Show("Zapisać zmiany?", "Pytanie", MessageBoxButtons.YesNoCancel);
         if (dr != DialogResult.Cancel)
         {
             if (dr == DialogResult.Yes)
             {
                 saved = true;
                 dc.saveData();
             }
             else
             {
                 refreshData();
                 saved = true;
                 searchEvents();
                 checkViewActualEvent();
                 dataGridView1.Refresh();
             }
             CompanyV name = new CompanyV(data, this);
             name.Show();
         }
     }
     else
     {
         CompanyV name = new CompanyV(data, this);
         name.Show();
     }
 }