コード例 #1
0
ファイル: ImportView.cs プロジェクト: thijsvtol/nosql_project
 private void btnUpload_Click(object sender, EventArgs e)
 {
     //Check if file is selected
     if (File != null)
     {
         //Check which RadioButton is selected
         if (rbUser.Checked)
         {
             Import.InsertUsers();
         }
         else if (rbIncident.Checked)
         {
             Import.InsertIncidents();
         }
         else
         {
             MessageBox.Show("Please select a datatable to insert.", "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         MessageBox.Show("Please select a file.", "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }