# HG changeset patch # User juanjose.montesdeocaarbos # Date 1323861344 10800 # Node ID bf993f99cee3792a5cdf758ce5f53fccf8a65860 # Parent 72a96459f910b240e8b833245d49916f683f079e Ticket #123: Patrocinadores de las vans. diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Domain/Repositories/IPatrocinadorRepository.cs --- a/Agendas/trunk/src/Agendas.Domain/Repositories/IPatrocinadorRepository.cs Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/Repositories/IPatrocinadorRepository.cs Wed Dec 14 08:15:44 2011 -0300 @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace AltNetHispano.Agendas.Domain.Repositories { @@ -7,5 +8,6 @@ void Save(Patrocinador patrocinador); Patrocinador Get(Guid patrocinadorId); void Delete(Patrocinador patrocinador); + IEnumerable GetAll(); } } \ No newline at end of file diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs --- a/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Factories/AgendaFactory.cs Wed Dec 14 08:15:44 2011 -0300 @@ -1,4 +1,5 @@ -using Agendas.Blog.Impl; +using System; +using Agendas.Blog.Impl; using Agendas.NHibernate; using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Domain.Repositories; @@ -44,5 +45,11 @@ { return new PersonaService(GetPersonaRepository(), GetEventoRespository()); } + + public static IPatrocinadorRepository GetPatrocinadorRepository() + { + ISessionFactory sessionFactory = NhHelper.GetSessionFactory(); + return new PatrocinadorRepository(sessionFactory); + } } } \ No newline at end of file diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Repositories.Memory/PatrocinadorRepository.cs --- a/Agendas/trunk/src/Agendas.Repositories.Memory/PatrocinadorRepository.cs Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Repositories.Memory/PatrocinadorRepository.cs Wed Dec 14 08:15:44 2011 -0300 @@ -1,4 +1,7 @@ -using AltNetHispano.Agendas.Domain; +using System; +using System.Collections.Generic; +using System.Linq; +using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Domain.Repositories; namespace AltNetHispano.Agendas.Repositories.Memory @@ -9,5 +12,13 @@ { Objects.Clear(); } + + public IEnumerable GetAll() + { + var patrocinadores = Objects.Values.ToList(); + patrocinadores.Sort((first, second) => first.Nombre.CompareTo(second.Nombre)); + + return patrocinadores; + } } } \ No newline at end of file diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Repositories.NHibernate/PatrocinadorRepository.cs --- a/Agendas/trunk/src/Agendas.Repositories.NHibernate/PatrocinadorRepository.cs Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Repositories.NHibernate/PatrocinadorRepository.cs Wed Dec 14 08:15:44 2011 -0300 @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using AltNetHispano.Agendas.Domain; using AltNetHispano.Agendas.Domain.Repositories; using NHibernate; @@ -21,5 +22,13 @@ { Session.Delete(patrocinador); } + + public IEnumerable GetAll() + { + var patrocinadores = Session.QueryOver().List(); + ((List)patrocinadores).Sort((first, second) => first.Nombre.CompareTo(second.Nombre)); + + return patrocinadores; + } } } \ No newline at end of file diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.Designer.cs --- a/Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.Designer.cs Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.Designer.cs Wed Dec 14 08:15:44 2011 -0300 @@ -169,6 +169,33 @@ } /// + /// Busca una cadena traducida similar a Descripcion. + /// + public static string PatrocinadorNewModelDescription { + get { + return ResourceManager.GetString("PatrocinadorNewModelDescription", resourceCulture); + } + } + + /// + /// Busca una cadena traducida similar a Legenda. + /// + public static string PatrocinadorNewModelLegend { + get { + return ResourceManager.GetString("PatrocinadorNewModelLegend", resourceCulture); + } + } + + /// + /// Busca una cadena traducida similar a Titulo. + /// + public static string PatrocinadorNewModelTitle { + get { + return ResourceManager.GetString("PatrocinadorNewModelTitle", resourceCulture); + } + } + + /// /// Busca una cadena traducida similar a Modifique los datos que desea corregir y presione guardar. /// public static string PersonaEditModelDescription { diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.resx --- a/Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.resx Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Resources/Properties/LayoutResources.resx Wed Dec 14 08:15:44 2011 -0300 @@ -189,4 +189,13 @@ Datos de la persona + + Descripcion + + + Legenda + + + Titulo + \ No newline at end of file diff -r 72a96459f910 -r bf993f99cee3 Agendas/trunk/src/Agendas.Web.Tests/Agendas.Web.Tests.csproj --- a/Agendas/trunk/src/Agendas.Web.Tests/Agendas.Web.Tests.csproj Wed Nov 30 08:56:01 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web.Tests/Agendas.Web.Tests.csproj Wed Dec 14 08:15:44 2011 -0300 @@ -46,6 +46,7 @@ + @@ -57,8 +58,11 @@ + + + @@ -96,6 +100,9 @@ + + +