Form1.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// 
// 创建人:宋欣
// 创建时间:2015-10-01
// 功能:
// Copyright (c) 2014 宋欣. All rights reserved.
// 

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using DBCreate.BLL;
using DBCreate.Common;
using DBCreate.Model;
using System.Drawing;

namespace DBCreate
{
    public partial class Form1 : Form
    {
        string txtSQLAddress = "";//数据库地址
        string txtSQLDataBase = "";//数据库名
        string txtSQLUser = "";//数据库登录名
        string txtSQLPwd = "";//数据库密码
        public Form1(string txtSQLAddress, string txtSQLDataBase, string txtSQLUser, string txtSQLPwd)
        {
            InitializeComponent();
            this.txtSQLAddress = txtSQLAddress;
            this.txtSQLDataBase = txtSQLDataBase;
            this.txtSQLUser = txtSQLUser;
            this.txtSQLPwd = txtSQLPwd;
        }

        /// <summary>
        ///     导入sheet
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnImport_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "97-2003 Excel|*.xls";
            openFileDialog.ShowDialog();
            if (!string.IsNullOrEmpty(openFileDialog.FileName))
            {
                ////EXCEL地址
                this.lblFileName.Text = openFileDialog.FileName;
                DBExcel dbExcel = new DBExcel();
                List<SheetEntity> sheets = dbExcel.GetSheet(openFileDialog.FileName);
                ListViewItem listView = new ListViewItem();
                foreach (var item in sheets)
                {
                    if (item.Serno != 0)
                    {
                        listView = new ListViewItem();
                        listView.Text = "";
                        listView.SubItems.Add(item.Serno.ToString());
                        listView.SubItems.Add(item.SheetName);
                        this.listView1.Items.Add(listView);
                    }
                }
后面还有 87 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。