public FrmDbToScript(string longServerName, string dbName)
        {
            InitializeComponent();
            DbName = dbName;
            dsb    = ObjHelper.CreatDsb(longServerName);
            dbobj  = ObjHelper.CreatDbObj(longServerName);
            this.lblServer.Text = longServerName;

            List <string> dblist = dbobj.GetDBList();

            if (dblist != null)
            {
                if (dblist.Count > 0)
                {
                    foreach (string name in dblist)
                    {
                        this.cmbDB.Items.Add(name);
                    }
                }
            }
            //DataTable dt = dbobj.GetDBList();
            //if (dt != null)
            //{
            //    foreach (DataRow row in dt.Rows)
            //    {
            //        this.cmbDB.Items.Add(row["name"].ToString());
            //    }
            //}
            this.btn_Creat.Enabled = false;
            this.cmbDB.Text        = DbName;
        }
        public FrmDbToScript(string longServerName)
        {
            InitializeComponent();
            dsb   = ObjHelper.CreatDsb(longServerName);
            dbobj = ObjHelper.CreatDbObj(longServerName);

            int    s      = longServerName.IndexOf("(");
            string server = longServerName.Substring(0, s);

            this.lblServer.Text = server;

            List <string> dblist = dbobj.GetTables("");

            if (dblist != null)
            {
                if (dblist.Count > 0)
                {
                    foreach (string dbName in dblist)
                    {
                        this.cmbDB.Items.Add(dbName);
                    }
                }
            }

            //DataTable dt = dbobj.GetDBList();
            //if (dt != null)
            //{
            //    foreach (DataRow row in dt.Rows)
            //    {
            //        string dbName = row["name"].ToString();
            //        this.cmbDB.Items.Add(dbName);
            //    }
            //}
            this.btn_Creat.Enabled = false;
            if (cmbDB.Items.Count > 0)
            {
                this.cmbDB.SelectedIndex = 0;
            }
        }