view Agendas/trunk/src/Agendas.NHibernate/EventoStateType.cs @ 170:13b661a29242

Ticket 153: UI de Publicar. Se internacionalizaron algunos mensajes automáticos en la pantalla de Publicar.
author juanjose.montesdeocaarbos
date Sat, 06 Aug 2011 12:57:54 -0300
parents 3639803112c6
children 68b09c30b0d2
line wrap: on
line source

using System.Collections.Generic;
using AltNetHispano.Agendas.Domain;
using NHibernate.SqlTypes;

namespace Agendas.NHibernate
{
	public class EventoStateType : GenericWellKnownInstanceType<EventoState, string> 
	{
		public static IEnumerable<EventoState> All
		{
			get
			{
				return new[]
			       	{
			       		EventoNullState.GetInstance(), EventoPropuestoState.GetInstance(), EventoAgendadoState.GetInstance(),
			       		EventoConfirmadoState.GetInstance(), EventoPublicadoState.GetInstance(), EventoCanceladoState.GetInstance(),
			       		EventoDescartadoState.GetInstance()
			       	};
			}
		}

		public EventoStateType()
			: base(All, (state, id) => state.Descripcion == id, state => state.Descripcion)
		{
		}

		public override SqlType[] SqlTypes
		{
			get { return new[] {SqlTypeFactory.GetString(25)}; }
		}
	}
}