Пример #1
0
        private bool CheckMsg(MsgRecordModel msgRecord)
        {
            bool IsWholeTrue = true;

            if (!CommonVariables.CurrentClientsContainKey(msgRecord.ObjectID))
            {
                IsWholeTrue = false;
            }

            return(IsWholeTrue);
        }
Пример #2
0
        private void SendGroupMsg(MsgRecordModel msgRecord)
        {
            IList <ContactPerson> contactPersons   = contactGroupService.GetContactPersonIDListByGroupID(msgRecord.RecivedObjectID);
            ContactPerson         curcontactPerson = contactPersonRepository.Find(t => t.ObjectID == msgRecord.ObjectID);

            msgRecord.ObjectName = curcontactPerson.ContactName;

            foreach (ContactPerson contactPerson in contactPersons)
            {
                if (CommonVariables.CurrentClientsContainKey(contactPerson.ObjectID))
                {
                    SendMsg(CommonVariables.GetCurrentClients[contactPerson.ObjectID].Recive_IP, CommonVariables.GetCurrentClients[contactPerson.ObjectID].Recive_Port, contactPerson.ObjectID, msgRecord);

                    //msgRecord.IsSended = true;
                }
                else
                {
                }
            }
        }