private void DataGridViewBindData(string tableName)
        {
            DataSet ds = DataBaseOperate.GetLogInfo(tableName);

            if (ds.Tables.Count == 1 && ds.Tables[0].Rows.Count == 0)
            {
                this.dataGridView_AnalyzeResult.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
            }
            else
            {
                this.dataGridView_AnalyzeResult.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }

            System.Data.DataTable  table  = new DataTable();
            System.Data.DataColumn column = new DataColumn();

            column.ColumnName        = "序号";
            column.AutoIncrement     = true;
            column.AutoIncrementSeed = 1;
            column.AutoIncrementStep = 1;
            table.Columns.Add(column);
            table.Merge(ds.Tables[0]);

            this.dataGridView_AnalyzeResult.DataSource = table;
            this.dataGridView_AnalyzeResult.Refresh();
        }
        private void button_DeriviveToExcel_Click(object sender, EventArgs e)
        {
            //获取数据
            DataTable dataTable = null;
            string    tableName = "LogInfo";
            DataSet   dataSet   = DataBaseOperate.GetLogInfo(tableName);

            if (dataSet != null && dataSet.Tables.Count > 0)
            {
                dataTable = dataSet.Tables[tableName];
            }

            CommFuction.DataGridViewToExcel(dataTable);
        }