Beispiel #1
0
 private void btnMySqlInDB_Click(object sender, EventArgs e)
 {
     action(new Action(() =>
     {
         var temps           = (this.lbFiles.Tag as List <ItemFileInfo>);
         List <string> files = temps.Where((l) => l.ExtensionName.Equals(".xls")).Select(l => l.Path).ToList();
         FileExcelDatas exceldatas;
         if (ReadExcelData.Instance().ReadExcelDataToCache(files, out exceldatas, new Action <string>((msg) => { Show(msg); }), true))
         {
             CreateMysql.Instance().ActionExcel(exceldatas, "AS", this.tbdbpack.Text, true, new Action <string>((msg) => { Show(msg); }));
             Show("");
             Show("Excel 转 Mysql 并且插入数据库 全部处理完成 ");
         }
     }));
 }
Beispiel #2
0
 private void btnMysql_Click(object sender, EventArgs e)
 {
     action(new Action(() =>
     {
         var temps           = (this.lbFiles.Tag as List <ItemFileInfo>);
         List <string> files = temps.Where((l) => l.ExtensionName.Equals(".xls")).Select(l => l.Path).ToList();
         FileExcelDatas exceldatas;
         if (ReadExcelData.Instance().ReadExcelDataToCache(files, out exceldatas, new Action <string>((msg) => { Show(msg); }), true))
         {
             CreateMysql.Instance().ActionExcel(exceldatas, "AS", this.tbdbpack.Text, false, new Action <string>((msg) => { Show(msg); }));
             Show("");
             Show("Excel 转 Mysql 全部处理完成 文件目录:" + CreateBase.MySqlPath);
             try
             {
                 System.Diagnostics.Process.Start(CreateBase.MySqlPath);
             }
             catch { }
         }
     }));
 }