changeset 290:15b428ae5931

Combinar
author juanjose.montesdeocaarbos
date Tue, 07 Feb 2012 23:29:06 -0300
parents 8b0c62c255cd (diff) a6037c6c88d8 (current diff)
children 5f1e3d35e113
files
diffstat 3 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription.
+        /// </summary>
+        public static string AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription {
+            get {
+                return ResourceManager.GetString("AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription.
+        /// </summary>
+        public static string AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription {
+            get {
+                return ResourceManager.GetString("AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to DuraciĆ³n.
         /// </summary>
         public static string Duracion {
--- 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 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <data name="AltNetHispanoAgendasWebModelsPatrocinadorEditModelNombreDescription" xml:space="preserve">
+    <value>Nombre del Patrocinador</value>
+  </data>
+  <data name="AltNetHispanoAgendasWebModelsPatrocinadorNewModelNombreDescription" xml:space="preserve">
+    <value>Nombre del Patrocinador</value>
+  </data>
   <data name="Duracion" xml:space="preserve">
     <value>DuraciĆ³n</value>
   </data>
--- 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);