Example #1
0
        public static void sendMessageToAdmin(string msg)
        {
            List <Member> members = ConnectionStubTemp.GetMembers();

            foreach (Member member in members)
            {
                if (member is SystemAdmin)
                {
                    member.addMessage(msg);
                }
            }
        }
Example #2
0
        public static void sendMessageToAllOwners(int storeId, string msg)
        {
            List <Member> members = ConnectionStubTemp.GetMembers();

            foreach (Member currMember in members)
            {
                if (currMember.isStoresOwner(storeId))
                {
                    currMember.addMessage(msg);
                }
            }
        }
Example #3
0
        public static void sendMessageToAllManagers(int storeId, string msg)
        {
            List <Member> members = ConnectionStubTemp.GetMembers();

            foreach (Member member in members)
            {
                LinkedList <StoreManager> managers = member.storeManaging;
                foreach (StoreManager manager in managers)
                {
                    if (manager.GetStore().id == storeId)
                    {
                        member.addMessage(msg);
                    }
                }
            }
        }