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);
            }
        }
Beispiel #3
0
        private void FrmAutoEntity_Load(object sender, EventArgs e)
        {
            Text = "生成实体类文件";
            ctxmBuilt.Visible      = false;
            txtAccess.Text         = "public";
            txtClassPreString.Text = "DT_";
            //设置数据库连接控件
            _IDBConfigSet = ContainerContext.Container.Resolve <IDBConfigSet>();
            DataTable dtConn = _IDBConfigSet.QueryDbConfig(_dicQuery).SafeGetDictionaryTable();

            uC_DbConnection1.SetDbConnComboBoxSource(dtConn);
            uC_DbConnection1.IsDbNameNotNull = false;

            #region 绑定下拉框
            //登录类型
            _dicString.Add(_sStringColumnList, "字符列名和集合");
            _dicString.Add(_sStringColumn, "字符列名");
            _dicString.Add(_sSimpleEntity, "简单实体");
            UIHelper.BindTypeValueDropDownList(cbbEntityType, UIHelper.GetTextValueTable(_dicString, false), false, true);
            cbbEntityType.SelectedIndex = 0;
            #endregion

            //设置网格的信息
            tvDataBaseInfo.Font               = new Font("新宋体", 10f, FontStyle.Bold);
            dgvTableInfo.ReadOnly             = true;
            dgvTableInfo.AutoGenerateColumns  = false;
            dgvTableInfo.AllowUserToAddRows   = false;
            dgvTableInfo.SelectionMode        = DataGridViewSelectionMode.FullRowSelect;
            dgvEntityInfo.ReadOnly            = true;
            dgvEntityInfo.AutoGenerateColumns = false;
            dgvEntityInfo.AllowUserToAddRows  = false;
        }
        /// <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>();
        }
        private void FrmReadDataBaseString_Load(object sender, EventArgs e)
        {
            //设置数据库连接控件
            _IDBConfigSet = ContainerContext.Container.Resolve <IDBConfigSet>();
            DataTable dtConn = _IDBConfigSet.QueryDbConfig(_dicQuery).SafeGetDictionaryTable();

            uC_DbConnection1.SetDbConnComboBoxSource(dtConn);
            uC_DbConnection1.IsDbNameNotNull = false;
            //
            lblTableWhereInfo.Text = "表名不为空时,Where条件作为表的过滤条件;表为空时,Where条件为自定义SQL。";
        }
        private void FrmGetOracleSql_Load(object sender, EventArgs e)
        {
            #region 绑定下拉框
            _dicString.Add("1", "新增");
            _dicString.Add("2", "修改");
            _dicString.Add("3", "查询");
            _dicString.Add("4", "删除");
            UIHelper.BindTypeValueDropDownList(cmbType, _dicString.GetTextValueTable(false), false, true);
            //
            _dicString.Clear();
            _dicString.Add("1", "左右#号");
            _dicString.Add("2", "SQL参数化");
            UIHelper.BindTypeValueDropDownList(cbbParaType, _dicString.GetTextValueTable(false), false, true);
            #endregion

            #region 设置数据库连接控件
            _IDBConfigSet = ContainerContext.Container.Resolve <IDBConfigSet>();
            DataTable dtConn = _IDBConfigSet.QueryDbConfig(_dicQuery).SafeGetDictionaryTable();
            uC_DbConnection1.SetDbConnComboBoxSource(dtConn);
            uC_DbConnection1.IsDbNameNotNull = true;
            #endregion
        }