예제 #1
0
        /// <summary>
        /// Genera nodos a partir de la navegaci�n de claves foraneas que referencian a la tabla.
        /// </summary>
        /// <param name="pParentNode">Nodo padre.</param>
        /// <date>2006-04-05T00:00:00</date>
        /// <author>moviedo</author>
        private void GenerateChildNodes(TreeNode pParentNode, ref StoreProcedures pStoreProcedures)
        {
            string wSpName = string.Empty;

            FieldRelationList wRelatedFields;

            try
            {
                if (pParentNode.Nodes.Count == 0)
                {
                    foreach (StoreProcedure wStoreProcedure in pStoreProcedures)
                    {
                        TreeNode wTreeNodeStoreProcedure = AddChildNode(pParentNode, wStoreProcedure.Name);

                        wRelatedFields = new FieldRelationList();

                        foreach (SPParameter wParameter in wStoreProcedure.Parameters)
                        {
                            AddChildNode(wTreeNodeStoreProcedure, wParameter.Name);
                        }
                    }

                    pParentNode.Expand();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #2
0
        /// <summary>
        /// Agrega un nodo a un nodo padre con informaci�n sobre una tabla relacionada a la que �ste representa.
        /// </summary>
        /// <param name="pParentNode">Nodo padre.</param>
        /// <param name="pText">Texto a mostrar.</param>
        /// <param name="pRelatedFields">Lista de relaciones entre campos.</param>
        /// <date>2006-04-05T00:00:00</date>
        /// <author>moviedo</author>
        private TreeNode AddChildNode(TreeNode pParentNode, string pText, FieldRelationList pRelatedFields)
        {
            TreeNode wTreeNode = new TreeNode(pText);

            wTreeNode.Checked = true;
            wTreeNode.Tag     = pRelatedFields;
            pParentNode.Nodes.Add(wTreeNode);

            return(wTreeNode);
        }
예제 #3
0
        /// <summary>
        /// Genera nodos a partir de la navegaci�n de claves foraneas que referencian a la tabla.
        /// </summary>
        /// <param name="pParentNode">Nodo padre.</param>
        /// <date>2006-04-05T00:00:00</date>
        /// <author>moviedo</author>
        private void GenerateChildNodes(TreeNode pParentNode, ref Tables pTablas)
        {
            string wTableName = string.Empty;

            FieldRelationList wRelatedFields;

            try
            {
                if (pParentNode.Nodes.Count == 0)
                {
                    foreach (Table wTabla in pTablas)

                    {
                        TreeNode wTreeNodeTable = AddChildNode(pParentNode, wTabla.Name);

                        wRelatedFields = new FieldRelationList();

                        foreach (Column wColumn in wTabla.Columns)
                        {
                            if (wColumn.IsIdentity)
                            {
                                FieldRelation wRelation = new FieldRelation();

                                wRelation.FieldName       = wColumn.Name;
                                wRelation.ParentFieldName = wColumn.Name;
                                wRelatedFields.Add(wRelation);

                                AddChildNode(wTreeNodeTable, wColumn.Name, wRelatedFields);
                            }
                            else
                            {
                                AddChildNode(wTreeNodeTable, wColumn.Name);
                            }
                        }
                    }

                    pParentNode.Expand();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #4
0
파일: frmTest.cs 프로젝트: Pelsoft/fwk_10.3
        /// <summary>
        /// Agrega un nodo a un nodo padre con informaci�n sobre una tabla relacionada a la que �ste representa.
        /// </summary>
        /// <param name="pParentNode">Nodo padre.</param>
        /// <param name="pText">Texto a mostrar.</param>
        /// <param name="pRelatedFields">Lista de relaciones entre campos.</param>
        /// <date>2006-04-05T00:00:00</date>
        /// <author>moviedo</author>
        private TreeNode AddChildNode(TreeNode pParentNode, string pText, FieldRelationList pRelatedFields)
        {
            TreeNode wTreeNode = new TreeNode(pText);

            wTreeNode.Checked   = true;
            wTreeNode.Tag       = pRelatedFields;
            pParentNode.Nodes.Add(wTreeNode);

            return wTreeNode;
        }
예제 #5
0
파일: frmTest.cs 프로젝트: Pelsoft/fwk_10.3
        /// <summary>
        /// Genera nodos a partir de la navegaci�n de claves foraneas que referencian a la tabla.
        /// </summary>
        /// <param name="pParentNode">Nodo padre.</param>
        /// <date>2006-04-05T00:00:00</date>
        /// <author>moviedo</author>
        private void GenerateChildNodes(TreeNode pParentNode, ref StoreProcedures pStoreProcedures)
        {
            string wSpName = string.Empty;

            FieldRelationList wRelatedFields;
            try
            {
                if (pParentNode.Nodes.Count == 0)
                {


                    foreach (StoreProcedure wStoreProcedure in pStoreProcedures)
                    {
                        TreeNode wTreeNodeStoreProcedure = AddChildNode(pParentNode, wStoreProcedure.Name);

                        wRelatedFields = new FieldRelationList();

                        foreach (SPParameter wParameter in wStoreProcedure.Parameters)
                        {
                             AddChildNode(wTreeNodeStoreProcedure, wParameter.Name); 

                        }



                    }

                    pParentNode.Expand();

                }


            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
예제 #6
0
파일: frmTest.cs 프로젝트: Pelsoft/fwk_10.3
        /// <summary>
        /// Genera nodos a partir de la navegaci�n de claves foraneas que referencian a la tabla.
        /// </summary>
        /// <param name="pParentNode">Nodo padre.</param>
        /// <date>2006-04-05T00:00:00</date>
        /// <author>moviedo</author>
        private void GenerateChildNodes(TreeNode pParentNode, ref Tables pTablas)
        {
            string wTableName = string.Empty;
        
            FieldRelationList wRelatedFields;
            try
            {
                if (pParentNode.Nodes.Count == 0)
                {
                 

                    foreach (Table wTabla in pTablas)
                        
                    {
                        TreeNode wTreeNodeTable = AddChildNode(pParentNode, wTabla.Name);

                         wRelatedFields = new FieldRelationList();

                         foreach (Column wColumn in wTabla.Columns)
                        {
                            if (wColumn.IsIdentity)
                            {
                                FieldRelation wRelation = new FieldRelation();

                                wRelation.FieldName = wColumn.Name;
                                wRelation.ParentFieldName = wColumn.Name; 
                                wRelatedFields.Add(wRelation);

                                AddChildNode(wTreeNodeTable, wColumn.Name, wRelatedFields);
                            }
                            else { AddChildNode(wTreeNodeTable, wColumn.Name); }
                           
                        }

                       

                    }

                    pParentNode.Expand();

                }


            }
            catch (Exception ex)
            {
                throw ex;
            }
           
        }