# HG changeset patch # User nelopauselli # Date 1317776380 10800 # Node ID b43dc14886e38fc5ef009eb063503c333e44f63e # Parent 51faeabfb9d949f2d0d6b3c531b8cbd1bfb03b01 Quitando ponente principal de la UI diff -r 51faeabfb9d9 -r b43dc14886e3 Agendas/trunk/db/v1.0/01 - Ponentes.sql --- a/Agendas/trunk/db/v1.0/01 - Ponentes.sql Tue Oct 04 21:30:55 2011 -0300 +++ b/Agendas/trunk/db/v1.0/01 - Ponentes.sql Tue Oct 04 21:59:40 2011 -0300 @@ -11,3 +11,9 @@ constraint FK_Ponentes_Persona foreign key (elt) references Persona) end go + +insert into Ponentes (evento_key, elt) + select e.Id, e.Ponente + from Evento e + where e.Ponente is not null and e.Ponente not in (select p.elt from Ponentes p where p.evento_key = e.Id) +go diff -r 51faeabfb9d9 -r b43dc14886e3 Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj --- a/Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj Tue Oct 04 21:30:55 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Agendas.Web.csproj Tue Oct 04 21:59:40 2011 -0300 @@ -217,9 +217,6 @@ - - - diff -r 51faeabfb9d9 -r b43dc14886e3 Agendas/trunk/src/Agendas.Web/DataProviders.cs --- a/Agendas/trunk/src/Agendas.Web/DataProviders.cs Tue Oct 04 21:30:55 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/DataProviders.cs Tue Oct 04 21:59:40 2011 -0300 @@ -16,20 +16,7 @@ select new SelectListItem {Text = t.TipoEventoStr, Value = t.TipoEvento.ToString()}; } - public static IEnumerable GetPonentes(this HtmlHelper helper, Guid id) - { - var lista = new List {new SelectListItem {Text = "[Ninguno]", Value = Guid.Empty.ToString()}}; - - var personaService = AgendaFactory.GetPersonaService(); - var personas = from p in personaService.GetAll() - orderby p.Nombre - select - new SelectListItem {Text = p.Nombre, Value = p.Id.ToString(), Selected = p.Id.Equals(id)}; - - return lista.Union(personas); - } - - public static IEnumerable GetOtrosPonentes(this HtmlHelper helper, IEnumerable ids) + public static IEnumerable GetPonentes(this HtmlHelper helper, IEnumerable ids) { var personas = AgendaFactory.GetPersonaService(); if (ids == null || !ids.Any()) return new SelectListItem[] {}; @@ -40,7 +27,7 @@ } - public static IEnumerable GetOtrosPonentesExcepto(this HtmlHelper helper, IEnumerable ids) + public static IEnumerable GetPonentesExcepto(this HtmlHelper helper, IEnumerable ids) { var personas = AgendaFactory.GetPersonaService(); diff -r 51faeabfb9d9 -r b43dc14886e3 Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml --- a/Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml Tue Oct 04 21:30:55 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml Tue Oct 04 21:59:40 2011 -0300 @@ -12,7 +12,7 @@ -@Html.DropDownList(string.Empty, Html.GetPonentes(Model), new { style = "vertical-align: top;" }) -
\ No newline at end of file diff -r 51faeabfb9d9 -r b43dc14886e3 Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Ponentes.cshtml --- a/Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Ponentes.cshtml Tue Oct 04 21:30:55 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/EditorTemplates/Ponentes.cshtml Tue Oct 04 21:59:40 2011 -0300 @@ -1,12 +1,12 @@ @model IEnumerable -@Html.ListBox(string.Empty, Html.GetOtrosPonentes(Model), new { style = "vertical-align: top;" }) +@Html.ListBox(string.Empty, Html.GetPonentes(Model), new { style = "vertical-align: top;" })
- @Html.DropDownList("posiblesOtrosPonentes", Html.GetOtrosPonentesExcepto(Model), new { style = "vertical-align: top;", id = "posiblesOtrosPonentes" }) + @Html.DropDownList("posiblesPonentes", Html.GetPonentesExcepto(Model), new { style = "vertical-align: top;", id = "posiblesPonentes" })
-
+
\ No newline at end of file