view Agendas/trunk/src/Agendas.Web/Models/PersonaModel.cs @ 166:fae2feae499e

Usando DefaultEditor para Publicar EditorTemplate para TimeSpan
author nelopauselli
date Fri, 05 Aug 2011 22:56:43 -0300
parents f17252543cbf
children 222362c29416
line wrap: on
line source

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

namespace AltNetHispano.Agendas.Web.Models
{
    public class PersonaIndexModel{
        public IEnumerable<PersonaDto> Items { get; set; }
    }

    public class PersonaNewModel
    {
        [Required]
        public string Nombre { get; set; }

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

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

		[DataType(DataType.Url)]
    	public string Blog { get; set; }
    }

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

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

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

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

		[DataType(DataType.Url)]
    	public string Blog { get; set; }
    }

    public class PersonaDto
    {
        public Guid Id { get; set; }
        public string Nombre { get; set; }
    }
}