private void FrmReadSqlServerDBData_Load(object sender, EventArgs e)
        {
            #region 初始化下拉框
            _dicString.Add("0", "全部提交");
            _dicString.Add("1", "单次提交");
            _dicString.Add("20", "每20次提交");
            _dicString.Add("50", "每50次提交");
            _dicString.Add("100", "每100次提交");
            _dicString.Add("200", "每200次提交");
            _dicString.Add("500", "每500次提交");
            UIHelper.BindTypeValueDropDownList(cbbCommitType, _dicString.GetTextValueTable(false), false, true);
            //数据库类型
            DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();
            UIHelper.BindTypeValueDropDownList(cbbTargetDbType, dtDbType, false, true);
            cbbTargetDbType.SelectedIndexChanged += cbbTargetDbType_SelectedIndexChanged;
            #endregion

            #region 设置数据库连接控件
            _IDBConfigSet = ContainerContext.Container.Resolve <IDBConfigSet>();
            //过滤指定数据库类型配置
            DataTable dtConn = _IDBConfigSet.QueryDbConfig(_dicQuery).SafeGetDictionaryTable();
            uC_DbConnection1.SetDbConnComboBoxSource(dtConn);
            uC_DbConnection1.IsDbNameNotNull                  = false;
            uC_DbConnection1.DBType_SelectedIndexChanged     += DataBaseType_SelectedChange;
            uC_DbConnection1.DBConnName_SelectedIndexChanged += DBConnName_SelectedChange;
            #endregion

            tsbExport.Enabled = false;
        }
        private void FrmDBConfigSet_D_Load(object sender, EventArgs e)
        {
            //接口对象
            _IDBConfigSet = ContainerContext.Container.Resolve <IDBConfigSet>();
            _IDataAccess  = DataAccessFactory.GetDefaultDataAccess();

            #region 绑定下拉框
            //数据库类型
            DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();
            UIHelper.BindTypeValueDropDownList(cbbDatabaseType, dtDbType, false, true);
            //登录类型
            IDictionary <string, string> dicQuery = new Dictionary <string, string>();
            dicQuery.Add(((int)LoginModeEnum.SQL).ToString(), "SQL身份验证");
            dicQuery.Add(((int)LoginModeEnum.Windows).ToString(), "Windows身份验证");
            UIHelper.BindTypeValueDropDownList(cbbLoginType, UIHelper.GetTextValueTable(dicQuery, false), false, true);
            #endregion

            //设置控件关系
            SetControlColumnRelation();

            if (_drEdit == null)//新增
            {
            }
            else //修改
            {
                UIHelper.SetControlValue(_listSupply, _drEdit);
            }
        }
Exemple #3
0
        private void FrmTableExtendProperty_Load(object sender, EventArgs e)
        {
            //数据库类型
            DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();

            UIHelper.BindTypeValueDropDownList(cbbDbType, dtDbType, false, true);
            //
            lblTableData.Text = "SQLite不支持注释。MySql只支持增加表注释,因为导入的信息不足以生成列注释!";
        }
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FrmVersionInfo_Load(object sender, EventArgs e)
        {
            SetTag();//设置Tag
            //数据库类型
            DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();

            UIHelper.BindTypeValueDropDownList(cbbDbType, dtDbType, true, true);
            //
            _IDBConfigSet = ContainerContext.Container.Resolve <IDBConfigSet>();
        }
Exemple #5
0
 private void UC_DbConnection_Load(object sender, EventArgs e)
 {
     #region 绑定下拉框
     //数据库类型
     DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();
     UIHelper.BindTypeValueDropDownList(cbbDatabaseType, dtDbType, false, true);
     //登录类型
     IDictionary <string, string> dicQuery = new Dictionary <string, string>();
     dicQuery.Add(((int)LoginModeEnum.SQL).ToString(), "SQL身份验证");
     dicQuery.Add(((int)LoginModeEnum.Windows).ToString(), "Windows身份验证");
     UIHelper.BindTypeValueDropDownList(cbbLoginType, UIHelper.GetTextValueTable(dicQuery, false), false, true);
     #endregion
     //数据库类型为只读
     cbbDatabaseType.Enabled = false;
 }
Exemple #6
0
        private void FrmExcelImportData_Load(object sender, EventArgs e)
        {
            //生成数据库类型
            DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();

            UIHelper.BindTypeValueDropDownList(cbbDbType, dtDbType, false, true);
            //
            _dicString.Add("0", "全部提交");
            _dicString.Add("1", "单次提交");
            _dicString.Add("20", "每20次提交");
            _dicString.Add("50", "每50次提交");
            _dicString.Add("100", "每100次提交");
            _dicString.Add("200", "每200次提交");
            _dicString.Add("500", "每500次提交");
            UIHelper.BindTypeValueDropDownList(cbbThree, _dicString.GetTextValueTable(false), false, true);
            //
            tsbAutoSQL.Enabled = false;
        }
        private void FrmCopyData_Load(object sender, EventArgs e)
        {
            IDictionary <string, string> dic_List = new Dictionary <string, string>();

            dic_List.Add("1", "自定义拼接字符串");
            dic_List.Add("2", "UNION清单");
            dic_List.Add("3", "UNION ALL清单");
            UIHelper.BindTypeValueDropDownList(cbbSqlType, dic_List.GetTextValueTable(false), false, true);

            //数据库类型
            DataTable dtDbType = DBToolUIHelper.GetBaseDataTypeTable();

            UIHelper.BindTypeValueDropDownList(cbbDbType, dtDbType, false, true);

            DataTable dtCopy = new DataTable();

            dtCopy.TableName        = _strTableName;
            bsTable.DataSource      = dtCopy;
            dgvTableList.DataSource = bsTable;
            GlobalValue.Instance.SetPublicDataSource(new DataTable[] { dtCopy });
            //
            lblTableData.Text = "可在Excel中复制数据后,点击网格后按ctrl + v粘贴即可。注:第一行为列名!";
        }
Exemple #8
0
 private void tsbDownLoad_Click(object sender, EventArgs e)
 {
     DBToolUIHelper.DownloadFile(@"DataModel\TableStruct\模板_表列说明变更.xlsx", "模板_表列说明变更", true);
 }
Exemple #9
0
 private void tsbDownLoad_Click(object sender, EventArgs e)
 {
     DBToolUIHelper.DownloadFile(@"DataModel\DataSql\模板_生成数据.xlsx", "生成数据模板", true);
 }