Пример #1
0
 public void closeRoom(int roomID, int adminID, string adminName)
 {
     RoomMember roomMember = new RoomMember();
     if (!roomMember.HasExisitingMembersExceedCurrentMemberLevel(roomID, adminID))
     {
         Room r = new Room();
         if (r.LoadByPrimaryKey(roomID))
         {
             r.RowStatusID = (byte)Helper.Enums.RowStatus.TemporaryDisabled;
             r.Save();
             roomMember.OutRoomMembers(roomID);
             Clients.Group(roomID.ToString()).closeRoom(roomID, adminName);
         }
     }
     else
     {
         throw new UnauthorizedAccessException("لا يمكن غلق الغرفة فى وجود " + Helper.TypeConverter.ToString(roomMember.GetColumn("MemberName")));
     }
 }