view Agendas/trunk/src/Agendas.Web/Models/PersonaModel.cs @ 257:730b80afa70d

Ticket #191: Perfil de Usuarios
author juanjose.montesdeocaarbos
date Wed, 19 Oct 2011 09:19:20 -0300
parents 222362c29416
children e6c041d8e1bf
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 string[] Roles { 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 string[] Roles { get; set; }
    }

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

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

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

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

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

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