Ejemplo n.º 1
0
        private void RefreshDatabase()
        {
            cbConnectStringName.Items.Clear();

            var list     = dal.FindAll().ToList();
            var itemList = new List <ComboBoxItem>();

            foreach (var item in list)
            {
                if (item.IsActive)
                {
                    var boxItem = new ComboBoxItem();
                    boxItem.Text  = item.Name;
                    boxItem.Value = item.ConnectionString;
                    if (!itemList.Contains(boxItem))
                    {
                        itemList.Add(boxItem);
                    }
                }
            }

            cbConnectStringName.DataSource    = itemList;
            cbConnectStringName.DisplayMember = "Text";
            cbConnectStringName.ValueMember   = "Value";
        }
Ejemplo n.º 2
0
        private void RefreshDatabase()
        {
            cbConnectStringName.Items.Clear();

            var list = dal.FindAll().ToList();

            foreach (var item in list)
            {
                if (item.IsActive)
                {
                    cbConnectStringName.Items.Add(item.Name);
                }
            }
        }
Ejemplo n.º 3
0
        public void RefreshDatabase()
        {
            cbConnectionStrings.Items.Clear();
            tvDatabase.Nodes.Clear();

            var dal = new DbConnDAL();
            //dal.InitData();

            var list = dal.FindAll().ToList();

            foreach (var item in list)
            {
                if (item.IsActive)
                {
                    cbConnectionStrings.Items.Add(item.Name);
                }
            }
        }
Ejemplo n.º 4
0
        private void DbSchemaViewer_Load(object sender, EventArgs e)
        {
            var dal = new DbConnDAL();
            //dal.InitData();

            var list = dal.FindAll().ToList();

            foreach (var item in list)
            {
                if (item.IsActive)
                {
                    cbConnectionStrings.Items.Add(item.Name);
                }
            }

            cbSchemaName.DataSource = new string[] {
                "MetaDataCollections",
                "Databases",
                "Catalogs",
                "Users",
                "Tables",
                "Columns",
                "Views",
                "ViewColumns",
                "Procedures",
                "ProcedureParameters",
                "Indexes",
                "IndexColumns",
                "ForeignKeys",
                "UserDefinedTypes",
                "StructuredTypeMembers",
                "DataSourceInformation",
                "DataTypes",
                "Restrictions",
                "ReservedWords"
            };
        }
Ejemplo n.º 5
0
        private void DbDocBuilder_Load(object sender, EventArgs e)
        {
            var dal = new DbConnDAL();
            //dal.InitData();

            var list = dal.FindAll().ToList();

            foreach (var item in list)
            {
                if (item.IsActive)
                {
                    cbConnectionStrings.Items.Add(item.Name);
                }
            }

            if (string.IsNullOrEmpty(CSName) == false)
            {
                ChangeConnection(CSName);
            }
            if (CurrentDatabase != null)
            {
                ChangeDatabase(CurrentDatabase);
            }
        }