Пример #1
0
        private void btnImport_Click(object sender, EventArgs e)
        {
            var dt = DataGridViewHelper.ImportFileToDataTable();

            if (dt.Rows.Count == 0)
            {
                return;
            }

            try
            {
                GetDataList(dt);
                SetMasterDataSource(grid.PageSize);
            }
            catch (Exception ex)
            {
                MessageHelper.ShowInfo("Excel文件格式错误" + ex.Message);
            }
        }