view Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs @ 119:8fa58a79656a

Historico
author Nelo@Kenia.neluz.int
date Wed, 22 Jun 2011 09:49:07 -0300
parents b74734a1a755
children 6f1041301797
line wrap: on
line source

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using DataAnnotationsExtensions;

namespace AltNetHispano.Agendas.Web.Models
{
	public class EventoIndexModel
	{
		public IEnumerable<EventoDto> ProximosEventos { get; set; }
	}

	public class EventoNewModel
	{
		public EventoNewModel()
		{
			Tipos = EventoModelHelper.GetTiposEventos();
		}

		[Required]
		public int Tipo { get; set; }

		[Required]
		public string Titulo { get; set; }

		[Required]
		public string Ponente { get; set; }

		[Required]
		public DateTime Fecha { get; set; }

		[Url]
		public string UrlInvitacion { get; set; }

		public IEnumerable<TipoEventoModel> Tipos { get; private set; }
	}

	public class TipoEventoModel
	{
		public int TipoEvento { get; set; }
		public string TipoEventoStr { get; set; }
	}

	public class EventoEditModel
	{
		[HiddenInput(DisplayValue = false)]
		public string Id { get; set; }

		[Required]
		public string Titulo { get; set; }

		[Required]
		public string Ponente { get; set; }

		[Required]
		public DateTime? Fecha { get; set; }

		[Url]
		public string UrlInvitacion { get; set; }
	}

	public class EventoAgendarModel
	{
		[HiddenInput(DisplayValue = false)]
		public string Id { get; set; }

		[Required]
		public string Titulo { get; set; }

		[Required]
		public string Ponente { get; set; }

		[Required]
		public DateTime? Fecha { get; set; }

		[Url]
		public string UrlInvitacion { get; set; }
	}

	public class EventoDto
	{
		public string Id { get; set; }
		public string Titulo { get; set; }
		public string Estado { get; set; }
		public string Fecha { get; set; }

		public bool PuedeAgendar { get; set; }
		public bool PuedeModificar { get; set; }
		public bool PuedeConfirmar { get; set; }
		public bool PuedePublicar { get; set; }
	}
}