Exemplo n.º 1
0
        internal static void FillColumns(TreeNode pTreeNodePadre, Fwk.DataBase.DataEntities.Table pTable)
        {
            if (pTable.IsColumnsLoaded)
            {
                return;
            }

            Fwk_DataBase.Metadata wMetadata = new Metadata();

            wMetadata.Table_FillColumns(pTable);

            LoadColumnsNodes(pTreeNodePadre, pTable);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Carga las coluimnas al nodo pParentNode.-
        /// </summary>
        /// <param name="pParentNode">Nodo padre </param>
        /// <param name="pTable"></param>
        private static void LoadColumnsNodes(TreeNode pParentNode, Fwk_DataEntities.Table pTable)
        {
            foreach (Fwk_DataEntities.Column wColumn in pTable.Columns)
            {
                String nullable = wColumn.Nullable ? "NULL" : String.Empty;

                TreeNode wTreeNode = new TreeNode();
                wTreeNode.Checked            = false;
                wTreeNode.Text               = wColumn.Name + " " + wColumn.Type + " " + nullable;
                wTreeNode.Tag                = wColumn.Name;
                wTreeNode.ImageIndex         = 5;
                wTreeNode.SelectedImageIndex = 5;
                pParentNode.Nodes.Add(wTreeNode);
            }
        }