Exemplo n.º 1
0
        public void InitInfo()
        {
            DataTable dt = CompanyInfoMgr.GetInfo();

            if (dt != null)
            {
                this.txtName.Text    = dt.Rows[0][1].ToString();
                this.txtLinkMan.Text = dt.Rows[0][2].ToString();
                this.txtAdress.Text  = dt.Rows[0][3].ToString();
                this.groupBox1.Text  = dt.Rows[0][1].ToString();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 构造员工树
        /// </summary>
        private void InitTree()
        {
            DataTable dt = CompanyInfoMgr.GetInfo();

            if (dt != null)
            {
                tvwEmp.Nodes.Clear();
                Root                    = new TreeNode();
                Root.Text               = dt.Rows[0][1].ToString();
                Root.ImageIndex         = 0;
                Root.SelectedImageIndex = 0;
                this.tvwEmp.Nodes.Add(Root);
                this.InitTreeDepart(Root);//加载树的部门节点
                Root.Expand();
            }
        }
Exemplo n.º 3
0
        private void BuidTree()
        {
            tvwDepart.Nodes.Clear();
            DataTable dt = CompanyInfoMgr.GetInfo();

            if (dt != null)
            {
                tvwDepart.Nodes.Clear();
                RootNode                    = new TreeNode();
                RootNode.Text               = dt.Rows[0][1].ToString();//跟节点的文本为本单位的名称
                RootNode.ImageIndex         = 0;
                RootNode.SelectedImageIndex = 0;
                tvwDepart.Nodes.Add(RootNode);

                this.BuildSecondDepart(RootNode);//加载部门节点
            }
        }