private void buttonGetFromBDByInterval_Click(object sender, EventArgs e)
 {
     if (isDB)
     {
         SetDefaultDataTable();
         ConnectToBD conn = new ConnectToBD();
         dataGridView1.DataSource = conn.GetFromDB(NameAndPath[0] + "\\" + NameAndPath[1], dateTimePickerDataStart.Value.ToString(), dateTimePickerDataEnd.Value.ToString());
         isGridView = true;
     }
     else
     {
         MessageBox.Show("База данных не подключена.");
     }
 }
 private void buttonSetToBD_Click(object sender, EventArgs e)
 {
     if (isDB)
     {
         ConnectToBD conn = new ConnectToBD();
         conn.SetToDB(NameAndPath[0] + "\\" + NameAndPath[1], (DataTable)dataGridView1.DataSource);
         isGridView = true;
         MessageBox.Show("Данные успешно записаны!");
     }
     else
     {
         MessageBox.Show("База данных не подключена.");
     }
 }
 private void buttonGetFromBD_Click(object sender, EventArgs e)
 {
     if (isDB)
     {
         SetDefaultDataTable();
         ConnectToBD conn = new ConnectToBD();
         dataGridView1.DataSource = conn.GetFromDB(NameAndPath[0] + "\\" + NameAndPath[1]);
         isGridView = true;
     }
     else
     {
         MessageBox.Show("База данных не подключена.");
     }
 }