Exemplo n.º 1
0
		public void RemovePersonFromQueue(WaitingPersonMeta personMeta, int queueId) {
			if (Queues.ContainsKey(queueId)) {
				var queue = Queues[queueId];

				queue.WaitingHistory.Add(personMeta);

				if (queue.WaitingPeoplesCount > 0)
					queue.WaitingPeoples.RemoveAll(x => x.Guid == personMeta.PersonGuid);
			}
		}
Exemplo n.º 2
0
		public void PersonHandledInQueue(int queueId, WaitingPersonMeta personMeta) {
			queuesRepository.RemovePersonFromQueue(personMeta, queueId);

			var handledPerson = StatisticsService.Instance.HandledPeople[personMeta.PersonGuid];
			handledPerson.WaitingTime = personMeta.StopWaitingTime - personMeta.StartWaitingTime;

			if (!String.IsNullOrEmpty(BrowserStateRepository.ConnectionId)) {
				var queue = queuesRepository.Queues[queueId];
				Clients.Client(BrowserStateRepository.ConnectionId).updateQueueLogs(queue);
			}
		}