/// <summary> /// 所驻人员 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void itemAreaPerson_Click(object sender, RoutedEventArgs e) { MenuItem item = sender as MenuItem; if (item != null && item.Tag != null) { string AreaId = item.Tag.ToString(); List <PP_OrgInfo> orgList = new List <PP_OrgInfo>(); ScheduleDetail[] scheduleDetails = null; if (Obj.Activity.ActivityStage == Types.ActivityStage.Prepare) { ScheduleDetail[] Details = Utility.getOrgGroupsBySchedule(Obj.Activity.Guid, Obj.Activity.ActivityStage); scheduleDetails = Details.Where(itm => { if (itm.ScheduleOrgs != null && itm.ScheduleOrgs.Length > 0) { foreach (var info in itm.ScheduleOrgs) { if (info.AREA_GUID == AreaId) { return(true); } } } return(false); }).ToArray(); } else { scheduleDetails = Utility.getOrgGroupsBySchedule(Obj.Activity.Guid, AreaId); } if (scheduleDetails != null && scheduleDetails.Length > 0) { foreach (var detail in scheduleDetails) { if (detail.ScheduleOrgs != null && detail.ScheduleOrgs.Length > 0) { foreach (var info in detail.ScheduleOrgs) { if (info.OrgInfo != null) { orgList.Add(info.OrgInfo); } } } } if (orgList.Count != 0) { Group.GroupDialog groupDialog = new Group.GroupDialog(orgList); groupDialog.ShowDialog(this); return; } } MessageBox.Show("此区域内没有组及人员信息!"); } }
private void itemGroupInfo_Click(object sender, RoutedEventArgs e) { if (tv_PersonPlan.SelectedItem != null) { PP_OrgInfo orgInfo = tv_PersonPlan.SelectedItem as PP_OrgInfo; if (orgInfo != null) { Group.GroupDialog groupDialog = new Group.GroupDialog(new List <PP_OrgInfo>() { orgInfo }); groupDialog.ShowDialog(this); } } }