예제 #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     label4.Text = "Zapisano zmiany!";
     saved       = true;
     dc.saveData();
     app.refreshData();
 }
예제 #2
0
파일: App.cs 프로젝트: romety2/pallets
 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();
     }
 }