Esempio n. 1
0
 private void btnAdddataToaccess_Click(object sender, RoutedEventArgs e)
 {
     string[,] data = new string[8, 7];
     if (txtModelName.Text != "")
     {
         AccessHelper.CreateOle(txtModelName.Text);
         DataTable DGDt = DataGridToDatable(DG1);
         for (int i = 0; i < 8; i++)
         {
             for (int j = 0; j < 7; j++)
             {
                 data[i, j] = DGDt.Rows[i][j].ToString();
             }
         }
         AccessHelper.InsertDataToTable_data(txtModelName.Text, data);
     }
 }