private RegionManage() { List<DB_Talk.Model.m_Member> disPatchNumberList = new DB_Talk.BLL.m_Member().GetModelList(string.Format("boxID={0} and i_isdispatch=1 and i_Flag=0", Pub.manageModel.BoxID)); if (disPatchNumberList.Count >= 2) { m_LeftDispatchNumber = new RegionCallInfo(); m_LeftDispatchNumber.ID = disPatchNumberList[0].ID; m_LeftDispatchNumber.MemberType = (CommControl.PublicEnums.EnumRegionMemberType)disPatchNumberList[0].i_TellType; m_LeftDispatchNumber.IsCalling = false; m_LeftDispatchNumber.Name = disPatchNumberList[0].vc_Name; m_LeftDispatchNumber.PrimaryKey = disPatchNumberList[0].i_Number.ToString(); m_LeftDispatchNumber.Number = disPatchNumberList[0].i_Number.ToString(); this.RegeditMemberData(m_LeftDispatchNumber); //从原始结构中查找状态 SingleUserControl baseControl = Pub._memberManage.GetSingleControl(Convert.ToInt64(Pub.manageModel.LeftDispatchNumber)); m_LeftDispatchNumber.Name = baseControl.MemberName; m_LeftDispatchNumber.DestNumber = baseControl.PeerNumber; m_LeftDispatchNumber.UserLineStatus = baseControl.UserLineStatus; m_RightDispathchNumber = new RegionCallInfo(); m_RightDispathchNumber.ID = disPatchNumberList[1].ID; m_RightDispathchNumber.MemberType = (CommControl.PublicEnums.EnumRegionMemberType)disPatchNumberList[1].i_TellType; m_RightDispathchNumber.IsCalling = false; m_RightDispathchNumber.Name = disPatchNumberList[1].vc_Name; m_RightDispathchNumber.PrimaryKey = disPatchNumberList[1].i_Number.ToString(); m_RightDispathchNumber.Number = disPatchNumberList[1].i_Number.ToString(); this.RegeditMemberData(m_RightDispathchNumber); //从原始结构中查找状态 SingleUserControl rightControl = Pub._memberManage.GetSingleControl(Convert.ToInt64(Pub.manageModel.RightDispatchNumber)); m_RightDispathchNumber.Name = baseControl.MemberName; m_RightDispathchNumber.DestNumber = baseControl.PeerNumber; m_RightDispathchNumber.UserLineStatus = baseControl.UserLineStatus; } }
internal RegionMemberInfo[] GetRegionMemberData(int regionID, CommControl.PublicEnums.EnumRegionMemberType memberType) { List<RegionMemberInfo> queryDataList = new List<RegionMemberInfo>(); if (memberType == CommControl.PublicEnums.EnumRegionMemberType.Camera) { List<DB_Talk.Model.m_CameraInfo> dataList = new DB_Talk.BLL.m_RegionRelation().QueryCameraMemberList( string.Format("RegionID = {0} and i_RelationType = {1}", regionID, (int)memberType)); foreach (DB_Talk.Model.m_CameraInfo sqlData in dataList) { RegionCameraInfo data = new RegionCameraInfo(); data.UserLineStatus = TalkControl.EnumUserLineStatus.Offline; data.ID = sqlData.ID; data.Name = sqlData.vc_Name; data.PrimaryKey = sqlData.vc_Name; data.Number = sqlData.vc_Name; data.ChannelID = (int)sqlData.i_ChanelID; data.MemberType = CommControl.PublicEnums.EnumRegionMemberType.Camera; queryDataList.Add(data); } } else { List<DB_Talk.Model.m_Member> dataList = new DB_Talk.BLL.m_RegionRelation().QueryPhoneMemeberList( string.Format("RegionID = {0} and i_RelationType = {1}", regionID, (int)memberType)); foreach (DB_Talk.Model.m_Member sqlData in dataList) { RegionCallInfo data = new RegionCallInfo(); data.ID = sqlData.ID; data.Name = sqlData.vc_Name; data.MemberType = (CommControl.PublicEnums.EnumRegionMemberType)sqlData.i_TellType; data.PrimaryKey = sqlData.i_Number.ToString(); data.Number = sqlData.i_Number.ToString(); queryDataList.Add(data); } } return queryDataList.ToArray(); }