Mercurial > altnet-hispano
comparison Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs @ 141:a5ff4de4a1d3
EditorForModel en Nuevo Evento y Proponer
author | Nelo@Guinea.neluz.int |
---|---|
date | Mon, 01 Aug 2011 00:10:20 -0300 |
parents | 3639803112c6 |
children | a2b14da4902f |
comparison
equal
deleted
inserted
replaced
140:3639803112c6 | 141:a5ff4de4a1d3 |
---|---|
50 if (ModelState.IsValid) | 50 if (ModelState.IsValid) |
51 { | 51 { |
52 var agenda = AgendaFactory.GetAgenda(); | 52 var agenda = AgendaFactory.GetAgenda(); |
53 | 53 |
54 var r = agenda.Agendar(model.Titulo, model.Ponente, model.Fecha, | 54 var r = agenda.Agendar(model.Titulo, model.Ponente, model.Fecha, |
55 model.UrlInvitacion, (TipoEvento)model.Tipo); | 55 model.UrlInvitacion, (TipoEvento)model.TipoEvento); |
56 if (r.Succeful) | 56 if (r.Succeful) |
57 { | 57 { |
58 this.AddNotification("Datos guardados"); | 58 this.AddNotification("Datos guardados"); |
59 return RedirectToAction("Index"); | 59 return RedirectToAction("Index"); |
60 } | 60 } |
167 { | 167 { |
168 if (ModelState.IsValid) | 168 if (ModelState.IsValid) |
169 { | 169 { |
170 var agenda = AgendaFactory.GetAgenda(); | 170 var agenda = AgendaFactory.GetAgenda(); |
171 | 171 |
172 var r = agenda.Proponer(model.Titulo, model.Ponente, model.UrlInvitacion, (TipoEvento)model.Tipo); | 172 var r = agenda.Proponer(model.Titulo, model.Ponente, model.UrlInvitacion, (TipoEvento)model.TipoEvento); |
173 if (r.Succeful) | 173 if (r.Succeful) |
174 return RedirectToAction("Index"); | 174 return RedirectToAction("Index"); |
175 ModelState.AddModelError("error", r.ToString()); | 175 ModelState.AddModelError("error", r.ToString()); |
176 } | 176 } |
177 return View(model); | 177 return View(model); |