コード例 #1
0
        public void Checkout(int occurrenceId, int personId)
        {
            var kiosk = new Arena.CheckIn.Kiosk();

            kiosk.CheckOut(occurrenceId, personId);

            /// If we checked out a leader, check to see if we need to close the occurrence
            var occurrence = new Arena.Core.Occurrence(occurrenceId);
            var occtype    = occurrence.OccurrenceType;

            if (occtype.MinLeaders != 0 || occtype.PeoplePerLeader != 0)
            {
                occurrence.PerformRoomRatioActions(Arena.Enums.CheckInAction.CheckOut, "ArenaOz");
            }
        }
コード例 #2
0
        public void Checkin(int personId, int occurrenceId, string securityCode, Arena.Enums.OccurrenceAttendanceType occurrenceAttendanceType)
        {
            var kiosk = new Arena.CheckIn.Kiosk();

            kiosk.CheckIn(
                new Arena.Core.Person(personId),
                new Arena.Core.Occurrence(occurrenceId),
                string.Empty,
                -1,
                securityCode,
                occurrenceAttendanceType);

            var occurrence = new Arena.Core.Occurrence(occurrenceId);
            var occtype    = occurrence.OccurrenceType;

            if (occtype.MinLeaders != 0 || occtype.PeoplePerLeader != 0)
            {
                occurrence.PerformRoomRatioActions(Arena.Enums.CheckInAction.CheckIn, "ArenaOz");
            }
        }
コード例 #3
0
        public void SetRoomCap(int locationId, int occurrenceId, int roomCap, bool includeLeaders)
        {
            /// save room cap
            var l = new Arena.Organization.Location(locationId);

            l.MaxPeople = roomCap;
            l.IncludeLeadersForMaxPeople = includeLeaders;
            l.Save("ArenaOz");

            /// Check if we need to close/open the locations occurrences
            ///
            List <Occurrence> locationOccurences = new List <Occurrence>();

            locationOccurences.AddRange(Occurrences.Where(x => x.LocationId == locationId));

            foreach (Occurrence o in locationOccurences)
            {
                var occurrence = new Arena.Core.Occurrence(o.Id);
                var occtype    = occurrence.OccurrenceType;

                if (occtype.UseRoomRatios)
                {
                    if (occtype.MinLeaders != 0 || occtype.PeoplePerLeader != 0)
                    {
                        occurrence.PerformRoomRatioActions(Arena.Enums.CheckInAction.CheckIn, "ArenaOz");
                    }
                    else
                    {
                        if (OccurrenceShouldBeClosed(roomCap, includeLeaders, occurrence.GetCurrentCount(Enums.OccurrenceAttendanceType.Person), occurrence.GetCurrentCount(Enums.OccurrenceAttendanceType.Leader)))
                        {
                            occurrence.OccurrenceClosed = true;
                        }
                        else
                        {
                            occurrence.OccurrenceClosed = false;
                        }
                        occurrence.Save("ArenaOz", false);
                    }
                }
            }
        }
コード例 #4
0
    protected void dropRoomStatus_SelectedIndexChanged(object sender, EventArgs e)
    {
        int id    = int.Parse(hfOccurrence.Value);
        int locId = new Arena.Core.Occurrence(id).LocationID;

        switch (dropRoomStatus.SelectedIndex)
        {
        case 0:
            CD.OpenCloseOccurrence(id, "ArenaOz", false);
            CD.OpenCloseRoom(locId, "ArenaOz", false);
            break;

        case 1:
            CD.OpenCloseOccurrence(id, "ArenaOz", true);
            CD.OpenCloseRoom(locId, "ArenaOz", false);
            break;

        case 2:
            CD.OpenCloseOccurrence(id, "ArenaOz", true);
            CD.OpenCloseRoom(locId, "ArenaOz", true);
            break;
        }
    }