view Agendas/trunk/src/Agendas.Domain/Cuenta.cs @ 185:2d02adb79322

Se agrega fecha de termino de un Evento y se incluye la hora a la fecha de inicio. Se modifica la propiedad Fecha del Evento, renombrandola FechaInicio. En el ModelView se agrega propiedades Duración y Hora del Evento cuando es Modificado, Nuevo y Agendado. Las fechas ingresadas son creadas en sistema UTC Queda pendiente Agregar duración a Google Calendar.
author alabra
date Tue, 09 Aug 2011 01:04:27 -0400
parents 7a2eeb9e9bf9
children
line wrap: on
line source

namespace AltNetHispano.Agendas.Domain
{
	public class Cuenta : Identificable
	{
		public virtual Persona Persona { get; set; }
		public virtual string LogonName { get; set; }
		public virtual IdentityProviderEnum IdentityProvider { get; set; }

		protected Cuenta()
		{
		}

		public Cuenta(IdentityProviderEnum identityProvider, string logonName)
		{
			LogonName = logonName;
			IdentityProvider = identityProvider;
		}

		public override bool Equals(object obj)
		{
			if (ReferenceEquals(null, obj)) return false;
			if (ReferenceEquals(this, obj)) return true;
			if (obj.GetType() != typeof (Cuenta)) return false;
			return Equals((Cuenta) obj);
		}

		public virtual bool Equals(Cuenta other)
		{
			if (ReferenceEquals(null, other)) return false;
			if (ReferenceEquals(this, other)) return true;
			return Equals(other.LogonName, LogonName) && Equals(other.IdentityProvider, IdentityProvider);
		}

		public override int GetHashCode()
		{
			unchecked
			{
				return ((LogonName != null ? LogonName.GetHashCode() : 0)*397) ^ IdentityProvider.GetHashCode();
			}
		}
	}
}