Ejemplo n.º 1
0
        private void Init_taskMembers()
        {
            List <ADR_Group> group_list = TaskMemberMaster.GetGroup_list();

            foreach (ADR_Group ag in group_list)
            {
                TreeNode tNode = this.members_treeView.Nodes.Add(ag.GroupID.ToString(), ag.GroupName.Value);
                foreach (ADR_TaskOwner atw in ag.TaskOwner_dic.Values)
                {
                    tNode.Nodes.Add(atw.OwnerSID.Value, atw.OwnerName.Value);
                }
            }
            this.members_treeView.ExpandAll();
        }
Ejemplo n.º 2
0
        private void members_treeView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            WinControl_helper.SetItemsChecked(this.cty_checkedListBox, false);

            int level = e.Node.Level;

            if (level == 0)
            {
                int gpID = -1;
                if (!int.TryParse(e.Node.Name, out gpID))
                {
                    return;
                }

                ADR_Group ag = TaskMemberMaster.Get_ADRgroup_ID(gpID);
                if (ag == null)
                {
                    return;
                }


                foreach (Country cty in ag.Country_list)
                {
                    int itemID = this.cty_itemID_dic[cty.name];
                    this.cty_checkedListBox.SetItemChecked(itemID, true);
                }
            }
            else if (level == 1)
            {
                ADR_TaskOwner ato = TaskMemberMaster.Get_taskOwner_SID(e.Node.Name);
                if (ato == null)
                {
                    return;
                }

                foreach (Country cty in ato.Country_list)
                {
                    int itemID = this.cty_itemID_dic[cty.name];
                    this.cty_checkedListBox.SetItemChecked(itemID, true);
                }
            }

            this.RefreshMainGrid();
        }