Esempio n. 1
0
        private void LoadData2TreeView(ThongTinHoSo value)
        {
            this.trvHoSo.Nodes.Clear();
            this._dictHoSo = new Dictionary <long, ThongTinHoSo>();
            this._dictHoSo.Add(value.ThongTinHoSoId, value);
            _rootId = value.RootId;
            long?num = value.KhoaChaId;

            while (num.HasValue)
            {
                ThongTinHoSoEntity thongTinHoSoEntity = ManageBase.SelectThongTinHoSoById(num.Value);
                num = null;
                bool flag = thongTinHoSoEntity != null;
                if (flag)
                {
                    ThongTinHoSo thongTinHoSo = ProcessData.MapThongTinHoSo(thongTinHoSoEntity);
                    num = thongTinHoSo.KhoaChaId;
                    this._dictHoSo.Add(thongTinHoSo.ThongTinHoSoId, thongTinHoSo);
                }
            }
            foreach (KeyValuePair <long, ThongTinHoSo> current in this._dictHoSo)
            {
                TreeNode node = this.AddData2TreeNode(current.Value);
                this.trvHoSo.Nodes.Add(node);
            }
            foreach (TreeNode node2 in this.trvHoSo.Nodes)
            {
                this.hideTreeNode(node2);
            }
            this.trvHoSo.ExpandAll();
        }