Beispiel #1
0
        /// <summary>
        /// 查看移动轨迹
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void itemTrack_Click(object sender, RoutedEventArgs e)
        {
            MenuItem    item   = sender as MenuItem;
            ContextMenu menu   = item.Parent as ContextMenu;
            var         target = menu.PlacementTarget as OrgToMapStyle;

            if (target != null)
            {
                PP_OrgInfo orgInfo = target.OrgInfo;
                //先查有没有车,或者车牌
                PP_VehicleInfo itemVehicle = null;
                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemVehicle = channel.GetPP_VehicleInfo(orgInfo.GUID);
                });
                if (itemVehicle != null && !string.IsNullOrEmpty(itemVehicle.VEHICLE_NUMB))
                {
                    OrgToMapStyle        group    = new OrgToMapStyle(orgInfo);
                    Track.TrackCondition conTrack = new Track.TrackCondition(group);
                    conTrack.VehicleNum = itemVehicle.VEHICLE_NUMB;
                    conTrack.Owner      = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(Element);
                    conTrack.Show();
                }
                else
                {
                    MessageBox.Show("没有查询到车辆信息!");
                }
            }
        }
 private void itemTrack_Click(object sender, RoutedEventArgs e)
 {
     if (tv_PersonPlan.SelectedItem != null)
     {
         PP_OrgInfo orgInfo = tv_PersonPlan.SelectedItem as PP_OrgInfo;
         if (orgInfo != null)
         {
             //先查有没有车,或者车牌
             PP_VehicleInfo itemVehicle = null;
             PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
             {
                 //更新当前节点
                 itemVehicle = channel.GetPP_VehicleInfo(orgInfo.GUID);
             });
             if (itemVehicle != null && !string.IsNullOrEmpty(itemVehicle.VEHICLE_NUMB))
             {
                 OrgToMapStyle        group    = new OrgToMapStyle(orgInfo);
                 Track.TrackCondition conTrack = new Track.TrackCondition(group);
                 conTrack.VehicleNum = itemVehicle.VEHICLE_NUMB;
                 conTrack.Owner      = VisualTreeHelperExtension.GetParentObject <System.Windows.Window>(this);
                 conTrack.Show();
             }
             else
             {
                 MessageBox.Show("没有查询到车辆信息!");
             }
         }
     }
 }
 /// <summary>
 /// 清除历史节点保留信息
 /// </summary>
 private void ClearHistoryItemInfos()
 {
     this.itemVehicle = new PP_VehicleInfo();
     this.itemEquipList.Clear();
     this.itemPersonList.Clear();
     this.wp_GrouperListr.Children.Clear();
     this.itemGrouperList.Clear();
     foreach (var ele in wp_dutylist.Children)
     {
         CheckBox chk = ele as CheckBox;
         if (chk != null)
         {
             chk.IsChecked = false;
         }
     }
 }
        /// <summary>
        /// 复制保存当前的车辆信息
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        private PP_VehicleInfo CopeVehicleInfo(PP_VehicleInfo item)
        {
            PP_VehicleInfo info = new PP_VehicleInfo();

            info.GUID          = item.GUID;
            info.ORG_GUID      = item.ORG_GUID;
            info.OTHER_NUMB    = item.OTHER_NUMB;
            info.REMARKS       = item.REMARKS;
            info.VEHICLE_MODEL = item.VEHICLE_MODEL;
            info.VEHICLE_NUMB  = item.VEHICLE_NUMB;
            info.VEHICLE_TYPE  = item.VEHICLE_TYPE;
            info.ADD_TYPE      = item.ADD_TYPE;
            info.DRIVER        = item.DRIVER;
            info.DRIVER_PHONE  = item.DRIVER_PHONE;
            info.PICTURE       = item.PICTURE;
            return(info);
        }
 void LoadData()
 {
     dg_VehicleList.ItemsSource = null;
     if (!string.IsNullOrEmpty(OrgID))
     {
         PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
         {
             //更新当前节点
             PP_VehicleInfo itemVehicle      = channel.GetPP_VehicleInfo(OrgID);
             this.dg_VehicleList.ItemsSource = new List <PP_VehicleInfo>()
             {
                 itemVehicle
             };
         });
     }
     else
     {
         List <PP_OrgInfo> nodes = new List <PP_OrgInfo>();
         PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
         {
             //更新当前节点
             nodes = channel.GetPP_OrgInfos(CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid);
         });
         if (nodes != null && nodes.Count > 0)
         {
             List <PP_VehicleInfo> itemVehicleList = new List <PP_VehicleInfo>();
             PP_VehicleInfo        VehicleList;
             foreach (var org in nodes)
             {
                 PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                 {
                     VehicleList = channel.GetPP_VehicleInfo(org.GUID);
                     if (VehicleList != null && !string.IsNullOrEmpty(VehicleList.VEHICLE_NUMB))
                     {
                         itemVehicleList.Add(VehicleList);
                     }
                 });
             }
             this.dg_VehicleList.ItemsSource = itemVehicleList;
         }
     }
 }
Beispiel #6
0
        private bool LoadDic(List <KeyValuePair <string, object> > groupList)
        {
            string groupid = "";

            foreach (var group in groupList)
            {
                groupid = group.Key.Replace(MapGroupTypes.MonitorGroup_.ToString(), "");
                PP_VehicleInfo vehicle = GetVehicleByGroupId(groupid);
                if (vehicle != null && !string.IsNullOrEmpty(vehicle.VEHICLE_NUMB))
                {
                    if (!idDic.ContainsKey(vehicle.VEHICLE_NUMB))
                    {
                        idDic.Add(vehicle.VEHICLE_NUMB, groupid);
                    }
                    if (!ObjDic.ContainsKey(vehicle.VEHICLE_NUMB))
                    {
                        ObjDic.Add(vehicle.VEHICLE_NUMB, vehicle);
                    }
                }
                List <PP_PersonInfo> persons = GetPersonByGroupID(groupid);
                if (persons != null && persons.Count > 0)
                {
                    foreach (var person in persons)
                    {
                        if (!idDic.ContainsKey(person.GUID))
                        {
                            idDic.Add(person.GUID, groupid);
                        }
                        if (!ObjDic.ContainsKey(person.GUID))
                        {
                            ObjDic.Add(person.GUID, person);
                        }
                    }
                }
            }
            if (idDic.Count == 0)
            {
                return(false);
            }
            return(true);
        }
        /// <summary>
        /// 根据组织结构信息读取该组织详细信息
        /// </summary>
        /// <param name="selectOrgInfo"></param>
        private void SetOrgInfoDetails(PP_OrgInfo selectOrgInfo)
        {
            //清除历史节点保留信息
            ClearHistoryItemInfos();

            if (selectOrgInfo != null)
            {
                //取得当前节点的数据
                itemOrgInfo = selectOrgInfo;

                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemPersonList = channel.GetPP_PersonInfos(selectOrgInfo.GUID);
                });

                if (itemPersonList.Count == 0)
                {
                    if (string.IsNullOrEmpty(selectOrgInfo.PARENT_GUID) == true)
                    {
                        PP_PersonInfo p0 = new PP_PersonInfo();
                        p0.GUID        = CO_IA.Client.Utility.NewGuid();
                        p0.ORG_GUID    = selectOrgInfo.GUID;
                        p0.ADD_TYPE    = 1;
                        p0.PERSON_TYPE = 0;

                        itemPersonList.Add(p0);

                        PP_PersonInfo p3 = new PP_PersonInfo();
                        p3.GUID        = CO_IA.Client.Utility.NewGuid();
                        p3.ORG_GUID    = selectOrgInfo.GUID;
                        p3.ADD_TYPE    = 1;
                        p3.PERSON_TYPE = 3;
                        itemPersonList.Add(p3);
                    }
                    else
                    {
                        PP_PersonInfo p1 = new PP_PersonInfo();

                        p1.GUID        = CO_IA.Client.Utility.NewGuid();
                        p1.ORG_GUID    = selectOrgInfo.GUID;
                        p1.ADD_TYPE    = 1;
                        p1.PERSON_TYPE = 1;

                        itemPersonList.Add(p1);


                        PP_PersonInfo p2 = new PP_PersonInfo();
                        p2.GUID        = CO_IA.Client.Utility.NewGuid();
                        p2.ORG_GUID    = selectOrgInfo.GUID;
                        p2.ADD_TYPE    = 1;
                        p2.PERSON_TYPE = 2;
                        itemPersonList.Add(p2);
                    }
                }
                else
                {
                    setDefaultImage();
                }

                grid_OrgLeaderHeader.DataContext = null;
                grid_OrgLeaderHeader.DataContext = selectOrgInfo;
                //根节点
                if (selectOrgInfo.PARENT_GUID == "")
                {
                    grid_OrgLeader.Visibility = System.Windows.Visibility.Visible;
                    tab_equ.Visibility        = System.Windows.Visibility.Collapsed;

                    grid_EquipList.Visibility   = System.Windows.Visibility.Hidden;
                    grid_GroupLeader.Visibility = System.Windows.Visibility.Hidden;

                    //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                    foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                    {
                        if (tempPersonInfo.PERSON_TYPE == 4)
                        {
                            itemGrouperList.Add(tempPersonInfo);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 0)
                        {
                            grid_OrgLeader.DataContext = null;
                            grid_OrgLeader.DataContext = tempPersonInfo;
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 3)
                        {
                            grid_PSO_Coordinator.DataContext = null;
                            grid_PSO_Coordinator.DataContext = tempPersonInfo;
                        }
                    }
                }
                //其他组织节点
                else
                {
                    grid_OrgLeader.Visibility = System.Windows.Visibility.Hidden;
                    tab_equ.Visibility        = System.Windows.Visibility.Visible;

                    grid_EquipList.Visibility   = System.Windows.Visibility.Visible;
                    grid_GroupLeader.Visibility = System.Windows.Visibility.Visible;


                    //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                    foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                    {
                        if (tempPersonInfo.PERSON_TYPE == 4)
                        {
                            itemGrouperList.Add(tempPersonInfo);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 1)
                        {
                            grid_GroupLeaderDetail.DataContext = null;
                            grid_GroupLeaderDetail.DataContext = tempPersonInfo;


                            grid_GroupLeaderImage.DataContext = null;
                            grid_GroupLeaderImage.DataContext = tempPersonInfo;
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 2)
                        {
                            grid_SLeaderInfo.DataContext = null;
                            grid_SLeaderInfo.DataContext = tempPersonInfo;

                            grid_SLeaderImage.DataContext = null;
                            grid_SLeaderImage.DataContext = tempPersonInfo;
                        }
                    }

                    PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                    {
                        //更新当前节点
                        itemEquipList = channel.GetPP_EqupInfos(selectOrgInfo.GUID);
                    });

                    dataGridMonitorEquipment.ItemsSource = itemEquipList;
                }

                //职责区域
                if (itemOrgInfo != null)
                {
                    if (!string.IsNullOrEmpty(itemOrgInfo.DUTY))
                    {
                        string[] dutys = itemOrgInfo.DUTY.Split(',');
                        for (int i = 0; i < dutys.Length; i++)
                        {
                            foreach (var ele in wp_dutylist.Children)
                            {
                                CheckBox chk = ele as CheckBox;
                                if (chk != null)
                                {
                                    if (chk.Tag.ToString() == dutys[i])
                                    {
                                        chk.IsChecked = true;
                                    }
                                }
                            }
                        }
                    }
                }
                //填充人员显示列表
                FillGrouperWrapPanel(itemGrouperList);

                #region 如果所有人员都没有照片就显示列表
                try
                {
                    bool isGourperHasImage = false;

                    foreach (PP_PersonInfo pinfo in this.itemGrouperList)
                    {
                        if (pinfo.PHOTO != null && pinfo.PHOTO.Length > 1)
                        {
                            isGourperHasImage = true;
                            break;
                        }
                    }

                    if (isGourperHasImage == false)
                    {
                        cb_Grouper.IsChecked      = true;
                        dg_GrouperList.Visibility = System.Windows.Visibility.Visible;

                        sv_Grouper.Visibility = System.Windows.Visibility.Hidden;
                    }
                    else
                    {
                        cb_Grouper.IsChecked      = false;
                        dg_GrouperList.Visibility = System.Windows.Visibility.Hidden;

                        sv_Grouper.Visibility = System.Windows.Visibility.Visible;
                    }
                }
                catch
                { }
                #endregion

                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemVehicle = channel.GetPP_VehicleInfo(selectOrgInfo.GUID);
                });

                if (itemVehicle == null || itemVehicle.GUID == null)
                {
                    itemVehicle              = new PP_VehicleInfo();
                    itemVehicle.GUID         = CO_IA.Client.Utility.NewGuid();
                    itemVehicle.ORG_GUID     = selectOrgInfo.GUID;
                    itemVehicle.ADD_TYPE     = 1;
                    itemVehicle.VEHICLE_TYPE = -1;
                }


                this.gird_VehicleInfo.DataContext = null;
                this.gird_VehicleInfo.DataContext = itemVehicle;

                #region  保存比对信息

                //保存组织信息
                itemOrgInfoForComp = CopeOrgInfo(itemOrgInfo);

                // 复制保存当前的人员信息
                itemPersonListForComp = CopePersonList(itemPersonList);

                // 复制保存当前的设备信息
                itemEquipListForComp = CopeEquipList(itemEquipList);

                // 复制保存当前的设备信息
                itemVehicleForComp = CopeVehicleInfo(itemVehicle);

                #endregion
            }
        }
Beispiel #8
0
        private void LoadXMLFile()
        {
            activity = CO_IA.Client.RiasPortal.ModuleContainer.Activity;

            //新建还是读取
            if (activity == null || string.IsNullOrEmpty(activity.Guid) == true)
            {
                //创建默认的组织结构组
                //CreateAndSaveDefaultOrgInfos();
            }
            else
            {
                //所得所有已存的人员组织结构
                List <PP_OrgInfo> orgList = new List <PP_OrgInfo>();



                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    orgList = channel.GetPP_OrgInfos(activity.Guid);
                });

                //新建还是读取
                if (orgList.Count == 0)
                {
                    //创建默认的组织结构组
                    //CreateAndSaveDefaultOrgInfos();
                }
                else
                {
                    List <Person> tempPersonList = new List <Person>();
                    Person        tempPerson     = new Person();
                    foreach (PP_OrgInfo oinfo in orgList)
                    {
                        tempPerson = new Person();

                        tempPerson.ID     = oinfo.GUID;
                        tempPerson.Opened = true;

                        /// <summary>
                        /// 每个节点获取的人员列表
                        /// </summary>
                        List <PP_PersonInfo> itemPersonList = new List <PP_PersonInfo>();


                        /// <summary>
                        /// 当前组员列表
                        /// </summary>
                        List <PP_PersonInfo> itemGrouperList = new List <PP_PersonInfo>();

                        /// <summary>
                        /// 每个节点获取的车辆信息
                        /// </summary>
                        List <MonitorStationEquInfo> itemEquipList = new List <MonitorStationEquInfo>();

                        /// <summary>
                        /// 每个节点获取的设备列表
                        /// </summary>
                        PP_VehicleInfo itemVehicle = new PP_VehicleInfo();

                        //读取人员信息
                        PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                        {
                            //更新当前节点
                            itemPersonList = channel.GetPP_PersonInfos(oinfo.GUID);
                        });

                        PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                        {
                            //更新当前节点
                            itemEquipList = channel.GetPP_EqupInfos(oinfo.GUID);
                        });
                        PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                        {
                            //更新当前节点
                            itemVehicle = channel.GetPP_VehicleInfo(oinfo.GUID);
                        });

                        if (1 == 1)
                        {
                            tempPerson.Name = oinfo.NAME + "(监测组)";
                        }
                        else
                        {
                            tempPerson.Name = oinfo.NAME;
                        }
                        //根节点
                        if (oinfo.PARENT_GUID == "")
                        {
                            //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                            foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                            {
                                if (tempPersonInfo.PERSON_TYPE == 4)
                                {
                                    itemGrouperList.Add(tempPersonInfo);
                                }
                                else if (tempPersonInfo.PERSON_TYPE == 0)
                                {
                                    tempPerson.Title = "主   任: " + tempPersonInfo.NAME;
                                }
                                else if (tempPersonInfo.PERSON_TYPE == 3)
                                {
                                    tempPerson.SubLeader = "协调员: " + tempPersonInfo.NAME;
                                }
                            }
                        }
                        //其他组织节点
                        else
                        {
                            //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                            foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                            {
                                if (tempPersonInfo.PERSON_TYPE == 4)
                                {
                                    itemGrouperList.Add(tempPersonInfo);
                                }
                                else if (tempPersonInfo.PERSON_TYPE == 1 && !String.IsNullOrEmpty(tempPersonInfo.NAME))
                                {
                                    tempPerson.Title = "组   长: " + tempPersonInfo.NAME;
                                }
                                else if (tempPersonInfo.PERSON_TYPE == 2 && !String.IsNullOrEmpty(tempPersonInfo.NAME))
                                {
                                    tempPerson.SubLeader = "副组长: " + tempPersonInfo.NAME;
                                }
                            }
                        }
                        if (itemGrouperList != null && itemGrouperList.Count > 0)
                        {
                            tempPerson.Department = "组   员: " + itemGrouperList.Count + "  名 ";
                        }
                        if (itemEquipList != null && itemEquipList.Count > 0)
                        {
                            tempPerson.Equiplist = "设   备: " + itemEquipList.Count + "  台";
                        }
                        if (itemVehicle != null && !String.IsNullOrEmpty(itemVehicle.VEHICLE_NUMB))
                        {
                            tempPerson.Vehicle = "车牌号: " + itemVehicle.VEHICLE_NUMB;
                        }
                        if (string.IsNullOrEmpty(oinfo.PARENT_GUID))
                        {
                            tempPerson.ManagerID     = "";
                            tempPerson.MinChildWidth = totalWidth;
                            persons.Add(tempPerson);
                        }
                        else
                        {
                            tempPerson.ManagerID = oinfo.PARENT_GUID;
                            tempPersonList.Add(tempPerson);
                        }
                    }
                    persons.AddRange(tempPersonList);
                    Rescale();
                }
            }
        }
Beispiel #9
0
        /// <summary>
        /// 获取监测车辆
        /// </summary>
        /// <returns></returns>
        private SummarizeTotalData GetTotalForMonitorCar()
        {
            SummarizeTotalData stData = new SummarizeTotalData();

            stData.GUID          = CO_IA.Client.Utility.NewGuid();
            stData.ACTIVITY_GUID = CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid;

            stData.KEY = "3";

            int VehicleCount = 0;

            List <PP_OrgInfo> nodes = new List <PP_OrgInfo>();

            PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
            {
                //更新当前节点
                nodes = channel.GetPP_OrgInfos(CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid);
            });
            if (nodes != null && nodes.Count() > 0)
            {
                for (int i = 0; i < nodes.Count(); i++)
                {
                    PP_VehicleInfo itemVehicle = new PP_VehicleInfo();
                    PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                    {
                        //更新当前节点
                        itemVehicle = channel.GetPP_VehicleInfo(nodes[i].GUID);
                        if (itemVehicle != null && !string.IsNullOrEmpty(itemVehicle.GUID))
                        {
                            VehicleCount++;
                        }
                    });
                }
            }
            //ScheduleDetail[] Details = Utility.getOrgGroupsBySchedule(CO_IA.Client.RiasPortal.ModuleContainer.Activity.Guid, CO_IA.Client.RiasPortal.ModuleContainer.Activity.ActivityStage);
            //if (Details != null && Details.Length > 0)
            //{
            //    for (int i = 0; i < Details.Length; i++)
            //    {
            //        ScheduleOrg[] scheduleOrgs = Details[i].ScheduleOrgs;
            //        if (scheduleOrgs != null && scheduleOrgs.Length > 0)
            //        {
            //            for (int j = 0; j < scheduleOrgs.Length; j++)
            //            {
            //                PP_OrgInfo orgInfo = scheduleOrgs[j].OrgInfo;
            //                if (orgInfo != null)
            //                {
            //                    string orgId = orgInfo.GUID;
            //                    PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke<I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
            //                    {
            //                        //更新当前节点
            //                        PP_VehicleInfo itemVehicle = channel.GetPP_VehicleInfo(orgId);
            //                        if (itemVehicle != null && !string.IsNullOrEmpty(itemVehicle.GUID))
            //                        {
            //                            VehicleCount += 1;
            //                        }
            //                    });
            //                }
            //            }
            //        }
            //    }
            //}

            stData.SUMMARIZEVALUE = VehicleCount;
            stData.UPDATEVALUE    = VehicleCount;

            return(stData);
        }
Beispiel #10
0
        /// <summary>
        /// 根据组织结构信息读取改组织详细信息
        /// </summary>
        /// <param name="selectOrgInfo"></param>
        private void SetOrgInfoDetails(PP_OrgInfo selectOrgInfo)
        {
            if (selectOrgInfo != null)
            {
                grid_GroupLeaderHeader.DataContext = null;
                grid_GroupLeaderHeader.DataContext = selectOrgInfo;

                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemPersonList = channel.GetPP_PersonInfos(selectOrgInfo.GUID);
                });


                //根节点
                if (selectOrgInfo.PARENT_GUID == "")
                {
                    grid_EquipList.Visibility = System.Windows.Visibility.Hidden;
                    //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                    foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                    {
                        if (tempPersonInfo.PERSON_TYPE == 4)
                        {
                            itemGrouperList.Add(tempPersonInfo);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 0)
                        {
                            grid_GroupLeaderDetail.DataContext = null;
                            grid_GroupLeaderDetail.DataContext = tempPersonInfo;


                            grid_GroupLeaderImage.DataContext = null;
                            grid_GroupLeaderImage.DataContext = tempPersonInfo;
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 3)
                        {
                            grid_SLeaderInfo.DataContext = null;
                            grid_SLeaderInfo.DataContext = tempPersonInfo;

                            grid_SLeaderImage.DataContext = null;
                            grid_SLeaderImage.DataContext = tempPersonInfo;
                        }
                    }
                }
                //其他组织节点
                else
                {
                    grid_EquipList.Visibility = System.Windows.Visibility.Visible;

                    //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                    foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                    {
                        if (tempPersonInfo.PERSON_TYPE == 4)
                        {
                            itemGrouperList.Add(tempPersonInfo);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 1)
                        {
                            grid_GroupLeaderDetail.DataContext = null;
                            grid_GroupLeaderDetail.DataContext = tempPersonInfo;


                            grid_GroupLeaderImage.DataContext = null;
                            grid_GroupLeaderImage.DataContext = tempPersonInfo;
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 2)
                        {
                            grid_SLeaderInfo.DataContext = null;
                            grid_SLeaderInfo.DataContext = tempPersonInfo;

                            grid_SLeaderImage.DataContext = null;
                            grid_SLeaderImage.DataContext = tempPersonInfo;
                        }
                    }

                    PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                    {
                        //更新当前节点
#warning 设备已修改
                        //itemEquipList = channel.GetPP_EqupInfos(selectOrgInfo.GUID);
                    });


                    this.dg_EquipList.ItemsSource = null;
                    this.dg_EquipList.ItemsSource = itemEquipList;
                }

                //填充人员显示列表
                FillGrouperWrapPanel(itemGrouperList);

                #region 如果所有人员都没有照片就显示列表
                try
                {
                    bool isGourperHasImage = false;

                    foreach (PP_PersonInfo pinfo in this.itemGrouperList)
                    {
                        if (pinfo.PHOTO != null && pinfo.PHOTO.Length > 1)
                        {
                            isGourperHasImage = true;
                            break;
                        }
                    }

                    if (isGourperHasImage == false)
                    {
                        cb_Grouper.IsChecked      = true;
                        dg_GrouperList.Visibility = System.Windows.Visibility.Visible;

                        sv_Grouper.Visibility = System.Windows.Visibility.Hidden;
                    }
                    else
                    {
                        cb_Grouper.IsChecked      = false;
                        dg_GrouperList.Visibility = System.Windows.Visibility.Hidden;

                        sv_Grouper.Visibility = System.Windows.Visibility.Visible;
                    }
                }
                catch
                { }
                #endregion

                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemVehicle = channel.GetPP_VehicleInfo(selectOrgInfo.GUID);
                });


                this.gird_VehicleInfo.DataContext = null;
                this.gird_VehicleInfo.DataContext = itemVehicle;
            }
        }
Beispiel #11
0
 public VehicleInfoDialog(PP_VehicleInfo info)
 {
     InitializeComponent();
     this.DataContext = info;
 }
        public PP_GroupGennelUC(string orgid)
        {
            InitializeComponent();

            //根据组织ID获取当前ID


            if (orgid != null)
            {
                //读取人员信息
                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemOrgInfo = channel.GetPP_OrgInfo(orgid);
                });

                if (itemOrgInfo == null)
                {
                    MessageBox.Show("未成功取得组织详细信息,请检查数据是否正确!");
                    return;
                }

                //读取人员信息
                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemPersonList = channel.GetPP_PersonInfos(itemOrgInfo.GUID);
                });

                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemEquipList = channel.GetPP_EqupInfos(itemOrgInfo.GUID);
                });
                PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.PersonSchedule.I_CO_IA_PersonSchedule>(channel =>
                {
                    //更新当前节点
                    itemVehicle = channel.GetPP_VehicleInfo(itemOrgInfo.GUID);
                });



                if (itemOrgInfo.ORG_TYPE == 1)
                {
                    this.tb_GroupName.Text = itemOrgInfo.NAME + "(监测组)";
                }
                else
                {
                    this.tb_GroupName.Text = itemOrgInfo.NAME;
                }

                string detailStr = "";

                //根节点
                if (itemOrgInfo.PARENT_GUID == "")
                {
                    //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                    foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                    {
                        if (tempPersonInfo.PERSON_TYPE == 4)
                        {
                            itemGrouperList.Add(tempPersonInfo);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 0)
                        {
                            this.tb_GroupLeader.Text = tempPersonInfo.NAME;

                            //设置人员照片
                            SetImageSource(tempPersonInfo.PHOTO);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 3)
                        {
                            detailStr += "协调员:" + tempPersonInfo.NAME + "; ";
                        }
                    }
                }
                //其他组织节点
                else
                {
                    //便利人员列表并赋值人员类型:0.主任 1.组长;2.副组长3.协调裕安。4.组员
                    foreach (PP_PersonInfo tempPersonInfo in itemPersonList)
                    {
                        if (tempPersonInfo.PERSON_TYPE == 4)
                        {
                            itemGrouperList.Add(tempPersonInfo);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 1)
                        {
                            this.tb_GroupLeader.Text = tempPersonInfo.NAME;

                            //设置人员照片
                            SetImageSource(tempPersonInfo.PHOTO);
                        }
                        else if (tempPersonInfo.PERSON_TYPE == 2)
                        {
                            detailStr += "副组长:" + tempPersonInfo.NAME + "; ";
                        }
                    }
                }

                detailStr += "组员" + itemGrouperList.Count + "名; " + "设备:" + itemEquipList.Count + "台; " + "车牌号:" + itemVehicle.VEHICLE_NUMB + ".";
                this.tb_GroupDetail.Text = detailStr;
            }
        }