From 6c6f895834eccd360d571a6bddff615291916331 Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 20 Jul 2015 14:29:34 +0000 Subject: [PATCH] =?UTF-8?q?Change=20=E2=80=98Count=E2=80=99=20to=20?= =?UTF-8?q?=E2=80=98MaxIndex=E2=80=99=20for=20=E2=80=98vlnIndexedFormatLis?= =?UTF-8?q?t=E2=80=99=20Rename=20=E2=80=98Count=E2=80=99=20to=20=E2=80=98M?= =?UTF-8?q?axIndex=E2=80=99=20in=20=E2=80=98vlnIndexedFormatList=E2=80=99?= =?UTF-8?q?=20to=20clarify=20what=20variable=20is,=20fix=20plural=20of=20b?= =?UTF-8?q?ox=20(boxes)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 2 +- PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index c5f9c3ad..97c7c24c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -5562,7 +5562,7 @@ namespace VEPROMS.CSLA.Library { get { - return(_TransTypeList == null || _TransTypeList.Count==0)? _TransTypeList = new TransTypeList(SelectNodes("TransTypeData/TransTypes"),MyFormat): _TransTypeList; + return(_TransTypeList == null || _TransTypeList.MaxIndex==0)? _TransTypeList = new TransTypeList(SelectNodes("TransTypeData/TransTypes"),MyFormat): _TransTypeList; } } public TransData(XmlNode xmlNode) : base(xmlNode) { } diff --git a/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs index c99a0db5..a8ab4953 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/vlnFormat.cs @@ -600,7 +600,7 @@ namespace VEPROMS.CSLA.Library return null; } } - public new int Count + public int MaxIndex { get { @@ -613,7 +613,7 @@ namespace VEPROMS.CSLA.Library vlnIndexedFormatList parent = InheritedList; //Check Inherited Value if (parent != null) { - int max2 = parent.Count; + int max2 = parent.MaxIndex; if (max2 > max) return max2; } @@ -780,6 +780,7 @@ namespace VEPROMS.CSLA.Library { if (name.EndsWith("y")) return name.Substring(0, name.Length - 1) + "ies"; if (name.EndsWith("ss")) return name + "es"; + if (name.EndsWith("x")) return name + "es"; else return name + "s"; } public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) @@ -787,7 +788,7 @@ namespace VEPROMS.CSLA.Library if (destType == typeof(string) && value is T) { // Return department and department role separated by comma. - return ((T)value).Count.ToString() + " " + (((T)value).Count == 1 ? typeof(C).Name : Plural(typeof(C).Name)); + return ((T)value).MaxIndex.ToString() + " " + (((T)value).MaxIndex == 1 ? typeof(C).Name : Plural(typeof(C).Name)); } return base.ConvertTo(context, culture, value, destType); }