view Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs @ 162:557c386fcecc

Ticket 153: UI de Publicar.
author juanjose.montesdeocaarbos
date Fri, 05 Aug 2011 22:02:23 -0300
parents c57ca21064f2
children b7621309524f
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
	{
		[Required]
		public int TipoEvento { get; set; }

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

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

		[Required]
		public DateTime Fecha { 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 Guid 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 Guid Ponente { get; set; }

		[Required]
		public DateTime? Fecha { 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]
		[UIHint("NroOrden")]
		[Range(1, short.MaxValue)]
		public short NroOrden { get; set; }

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

		[Required]
		[UIHint("DuracionReal")]
		public TimeSpan DuracionReal { 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; }
        public bool PuedeCancelar { get; set; }
        public bool PuedeDescartar { get; set; }
        public bool PuedeReAgendar { get; set; }
        public bool PuedeReProponer { get; set; }
	}
}