Mercurial > altnet-hispano
view Agendas/trunk/src/Agendas.Domain/Track.cs @ 195:4d0b2552edb2
Ticket 170: Cuando se agenda o confirma un evento, verificar que no existan otros dentro del rango horario en que se desarrollarĂ¡ el evento actual.
author | juanjose.montesdeocaarbos |
---|---|
date | Sat, 13 Aug 2011 01:01:54 -0300 |
parents | beeb48ddb44a |
children |
line wrap: on
line source
using System; using System.Collections.Generic; namespace AltNetHispano.Agendas.Domain { public class Track : Identificable { private readonly IList<TrackLog> _logs; private readonly ICollection<TrackLog> _newLogs = new List<TrackLog>(); protected Track() { //ctor para NHibernate _logs = new List<TrackLog>(); } public Track(Evento evento, Accion accion) : this() { Usuario = IdentityContext.GetUsuario(); Evento = evento; Accion = accion; } public virtual Evento Evento { get; private set; } public virtual Accion Accion { get; private set; } public virtual Persona Usuario { get; private set; } public virtual IEnumerable<TrackLog> Logs { get { return _logs; } } public virtual void LogAdd(TrackLog trackLog) { trackLog.Track = this; _logs.Add(trackLog); _newLogs.Add(trackLog); } public virtual IEnumerable<TrackLog> GetLogsNews() { return _newLogs; } } public enum Accion { Proponer = 1, Agendar = 2, Modificar = 3, CambiarTitulo = 4, Publicar = 5, Confirmar = 6, Cancelar = 7, Descartar = 8, ReAgendar = 9, ReProponer = 10 } }