comparison Agendas/trunk/src/Agendas.Web/Models/EventoModel.cs @ 109:6bd9be78caa0

Merge
author Nelo@Kenia.neluz.int
date Tue, 07 Jun 2011 23:21:07 -0300
parents 80c22175c9b5
children 0bca45e1e664
comparison
equal deleted inserted replaced
108:786a90e26c9b 109:6bd9be78caa0
4 using System.Web.Mvc; 4 using System.Web.Mvc;
5 using DataAnnotationsExtensions; 5 using DataAnnotationsExtensions;
6 6
7 namespace AltNetHispano.Agendas.Web.Models 7 namespace AltNetHispano.Agendas.Web.Models
8 { 8 {
9 public class EventoIndexModel 9 public class EventoIndexModel
10 {
11 public IEnumerable<EventoDto> ProximosEventos { get; set; }
12 }
13
14 public class EventoNewModel
15 {
16 public EventoNewModel()
10 { 17 {
11 public IEnumerable<EventoDto> ProximosEventos { get; set; } 18 Tipos = EventoModelHelper.GetTiposEventos();
12 } 19 }
13 20
14 public class EventoNewModel 21 [Required]
15 { 22 public int Tipo { get; set; }
16 [Required]
17 public string Titulo { get; set; }
18 23
19 [Required] 24 [Required]
20 public string Ponente { get; set; } 25 public string Titulo { get; set; }
21 26
22 [Required] 27 [Required]
23 public DateTime Fecha { get; set; } 28 public string Ponente { get; set; }
24 29
25 [Url] 30 [Required]
26 public string UrlInvitacion { get; set; } 31 public DateTime Fecha { get; set; }
27 }
28 32
29 public class EventoEditModel 33 [Url]
30 { 34 public string UrlInvitacion { get; set; }
31 [HiddenInput(DisplayValue = false)]
32 public string Id { get; set; }
33 35
34 [Required] 36 public IEnumerable<TipoEventoModel> Tipos { get; private set; }
35 public string Titulo { get; set; } 37 }
36 38
37 [Required] 39 public class TipoEventoModel
38 public string Ponente { get; set; } 40 {
41 public int TipoEvento { get; set; }
42 public string TipoEventoStr { get; set; }
43 }
39 44
40 [Required] 45 public class EventoEditModel
41 public DateTime? Fecha { get; set; } 46 {
47 [HiddenInput(DisplayValue = false)]
48 public string Id { get; set; }
42 49
43 [Url] 50 [Required]
44 public string UrlInvitacion { get; set; } 51 public string Titulo { get; set; }
45 }
46
47 52
48 public class EventoDto 53 [Required]
49 { 54 public string Ponente { get; set; }
50 public string Id { get; set; } 55
51 public string Titulo { get; set; } 56 [Required]
52 public DateTime Fecha { get; set; } 57 public DateTime? Fecha { get; set; }
53 } 58
59 [Url]
60 public string UrlInvitacion { get; set; }
61 }
62
63
64 public class EventoDto
65 {
66 public string Id { get; set; }
67 public string Titulo { get; set; }
68 public DateTime Fecha { get; set; }
69 }
54 } 70 }