/// <summary> /// 初始化状态栏 /// </summary> private void InitStatusInfo() { DataTable dt = ConpanyInfoMgr.GetInfo(); if (dt != null) { this.statusInfo.Items[2].Text = dt.Rows[0][1].ToString(); this.statusInfo.Items[3].Text = dt.Rows[0][3].ToString(); } this.statusInfo.Items[0].Text = "当前系统操作员:" + this._user; this.timer.Start(); }
public void InitInfo() { DataTable dt = ConpanyInfoMgr.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(); } }
/// <summary> /// 出示化员工树 /// </summary> private void InitTree() { DataTable dt = ConpanyInfoMgr.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(); } }
private void BuidTree() { tvwDepart.Nodes.Clear(); DataTable dt = ConpanyInfoMgr.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.BuildNodesDepart(RootNode);//加载部门节点 } }