# HG changeset patch
# User juanjose.montesdeocaarbos
# Date 1328668146 10800
# Node ID 15b428ae5931029713d3f169113d62eea5d8f6fd
# Parent 8b0c62c255cd09778239d0dd8a300f152877a0b5# Parent a6037c6c88d8fd02a4964c2b1499f8e8f0a5c835
Combinar
diff -r a6037c6c88d8 -r 15b428ae5931 Agendas/trunk/src/Agendas.Resources/Properties/DataAnnotationResources.Designer.cs
--- a/Agendas/trunk/src/Agendas.Resources/Properties/DataAnnotationResources.Designer.cs Mon Jan 30 01:52:47 2012 -0300
+++ b/Agendas/trunk/src/Agendas.Resources/Properties/DataAnnotationResources.Designer.cs Tue Feb 07 23:29:06 2012 -0300
@@ -61,6 +61,24 @@
}
///
+ /// Looks up a localized string similar to AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription.
+ ///
+ public static string AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription {
+ get {
+ return ResourceManager.GetString("AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription.
+ ///
+ public static string AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription {
+ get {
+ return ResourceManager.GetString("AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to DuraciĆ³n.
///
public static string Duracion {
diff -r a6037c6c88d8 -r 15b428ae5931 Agendas/trunk/src/Agendas.Resources/Properties/DataAnnotationResources.resx
--- a/Agendas/trunk/src/Agendas.Resources/Properties/DataAnnotationResources.resx Mon Jan 30 01:52:47 2012 -0300
+++ b/Agendas/trunk/src/Agendas.Resources/Properties/DataAnnotationResources.resx Tue Feb 07 23:29:06 2012 -0300
@@ -117,6 +117,12 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Nombre del Patrocinador
+
+
+ Nombre del Patrocinador
+
DuraciĆ³n
diff -r a6037c6c88d8 -r 15b428ae5931 Agendas/trunk/src/Agendas.Web/CustomModelMetadataProvider/DataAnnotationAndConventionModelMetadataProvider.cs
--- a/Agendas/trunk/src/Agendas.Web/CustomModelMetadataProvider/DataAnnotationAndConventionModelMetadataProvider.cs Mon Jan 30 01:52:47 2012 -0300
+++ b/Agendas/trunk/src/Agendas.Web/CustomModelMetadataProvider/DataAnnotationAndConventionModelMetadataProvider.cs Tue Feb 07 23:29:06 2012 -0300
@@ -26,10 +26,28 @@
if (propertyName != null)
{
// Si no hay displayName asignado, lo buscamos entre los recursos
+ // Primero lo buscarmos por el Assembly FullName y el propertyName
+ // Si no lo encuentra, buscamos por el propertyName unicamente
+ if (string.IsNullOrWhiteSpace(modelMetadata.DisplayName))
+ {
+ if (containerType != null && containerType.FullName != null)
+ modelMetadata.DisplayName =
+ _resolverByConvention.GetDisplayName(string.Format("{0}{1}", containerType.FullName.Replace(".", string.Empty),
+ propertyName));
+ }
if (string.IsNullOrWhiteSpace(modelMetadata.DisplayName))
modelMetadata.DisplayName = _resolverByConvention.GetDisplayName(propertyName);
// Si no hay description asignado, lo buscamos entre los recursos
+ // Primero lo buscarmos por el Assembly FullName y el propertyName
+ // Si no lo encuentra, buscamos por el propertyName unicamente
+ if (string.IsNullOrWhiteSpace(modelMetadata.Description))
+ {
+ if (containerType != null && containerType.FullName != null)
+ modelMetadata.Description =
+ _resolverByConvention.GetDescription(string.Format("{0}{1}", containerType.FullName.Replace(".", string.Empty),
+ propertyName));
+ }
if (string.IsNullOrWhiteSpace(modelMetadata.Description))
modelMetadata.Description = _resolverByConvention.GetDescription(propertyName);