Change ‘Count’ to ‘MaxIndex’ for ‘vlnIndexedFormatList’
Rename ‘Count’ to ‘MaxIndex’ in ‘vlnIndexedFormatList’ to clarify what variable is, fix plural of box (boxes)
This commit is contained in:
parent
a98f4998da
commit
6c6f895834
@ -5562,7 +5562,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
get
|
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) { }
|
public TransData(XmlNode xmlNode) : base(xmlNode) { }
|
||||||
|
@ -600,7 +600,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public new int Count
|
public int MaxIndex
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -613,7 +613,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
vlnIndexedFormatList<T> parent = InheritedList; //Check Inherited Value
|
vlnIndexedFormatList<T> parent = InheritedList; //Check Inherited Value
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
{
|
{
|
||||||
int max2 = parent.Count;
|
int max2 = parent.MaxIndex;
|
||||||
if (max2 > max)
|
if (max2 > max)
|
||||||
return max2;
|
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("y")) return name.Substring(0, name.Length - 1) + "ies";
|
||||||
if (name.EndsWith("ss")) return name + "es";
|
if (name.EndsWith("ss")) return name + "es";
|
||||||
|
if (name.EndsWith("x")) return name + "es";
|
||||||
else return name + "s";
|
else return name + "s";
|
||||||
}
|
}
|
||||||
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType)
|
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)
|
if (destType == typeof(string) && value is T)
|
||||||
{
|
{
|
||||||
// Return department and department role separated by comma.
|
// 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);
|
return base.ConvertTo(context, culture, value, destType);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user