view Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs @ 279:1e889a2e45c5

#125: ABM de patrocinadores.
author juanjose.montesdeocaarbos
date Thu, 22 Dec 2011 10:04:08 -0300
parents c61954d24c8c
children 79942e030118
line wrap: on
line source

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using AltNetHispano.Agendas.Twitter;
using DataAnnotationsExtensions;

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

	public class EventoNewModel
	{
		[Required]
		public int TipoEvento { get; set; }

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

		public IEnumerable<Guid> Ponentes { get; set; }

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

        [Required]
	    public TimeSpan Hora { get; set; }

        [Required]
        public TimeSpan Duracion { get; set; }

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

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

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

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

        [Required]
        public TimeSpan? Hora { get; set; }

        [Required]
        public TimeSpan? Duracion { get; set; }

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

		public IEnumerable<Guid> Ponentes { get; set; }
	}

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

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

		public IEnumerable<Guid> Ponentes { get; set; }

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

        [Required]
        public TimeSpan? Hora { get; set; }

        [Required]
        public TimeSpan? Duracion { get; set; }

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

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

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

		[Required]
		[Range(1, short.MaxValue)]
		public short NroOrden { get; set; }

		[Required]
		[Url]
		public string UrlWiki { get; set; }

		[Required]
		public TimeSpan DuracionReal { get; set; }
	}

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

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

		[HiddenInput]
		[UIHint("Recordatorios")]
		public Recordatorios Recordatorios { 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 string Duracion { get; set; }

	    public bool PuedeAgendar { get; set; }
		public bool PuedeModificar { get; set; }
		public bool PuedeConfirmar { get; set; }
		public bool PuedePublicar { get; set; }
        public bool PuedeCancelar { get; set; }
        public bool PuedeDescartar { get; set; }
        public bool PuedeReAgendar { get; set; }
        public bool PuedeReProponer { get; set; }
	}
}