CSLA - Extension
This commit is contained in:
@@ -8,13 +8,6 @@
|
||||
// $History: $
|
||||
// ========================================================================
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using Csla;
|
||||
using Csla.Data;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
@@ -23,22 +16,16 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public partial class ChildFoldersPropertyDescriptor
|
||||
{
|
||||
public override string DisplayName
|
||||
{ get { return Item.Name; } }
|
||||
public override string Description
|
||||
{ get { return Item.Title; } }
|
||||
public override string Name
|
||||
{ get { return Item.Name; } }
|
||||
}
|
||||
public override string DisplayName => Item.Name;
|
||||
public override string Description => Item.Title;
|
||||
public override string Name => Item.Name;
|
||||
}
|
||||
public partial class FolderDocVersionsPropertyDescriptor
|
||||
{
|
||||
public override string DisplayName
|
||||
{ get { return Item.Name; } }
|
||||
public override string Description
|
||||
{ get { return Item.Name; } }
|
||||
public override string Name
|
||||
{ get { return Item.Name; } }
|
||||
}
|
||||
public override string DisplayName => Item.Name;
|
||||
public override string Description => Item.Name;
|
||||
public override string Name => Item.Name;
|
||||
}
|
||||
public class FormatList : System.ComponentModel.StringConverter
|
||||
{
|
||||
private static SortedList<string, FormatInfo> _MyFormatInfoList;
|
||||
@@ -64,19 +51,10 @@ namespace VEPROMS.CSLA.Library
|
||||
_MyFormatInfoList.Add("", null);
|
||||
}
|
||||
}
|
||||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
{
|
||||
return new StandardValuesCollection((ICollection)MyFormatInfoList.Values);
|
||||
}
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public static int? ToInt(string formatName)
|
||||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) => new StandardValuesCollection((ICollection)MyFormatInfoList.Values);
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context) => true;
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) => true;
|
||||
public static int? ToInt(string formatName)
|
||||
{
|
||||
if (formatName == null || formatName == string.Empty) return null;
|
||||
foreach (FormatInfo formatInfo in MyFormatInfoList.Values)
|
||||
@@ -136,31 +114,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!ds.Inactive)_MyDocStyleList.Add(ds.Name,10000 + (int) ds.Index);
|
||||
}
|
||||
}
|
||||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
{
|
||||
return new StandardValuesCollection((ICollection)MyDocStyleList.Keys);
|
||||
}
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public static int? ToInt(string docStyleName)
|
||||
{
|
||||
return MyDocStyleList[docStyleName];
|
||||
}
|
||||
public static string ToString(int? sectionType)
|
||||
{
|
||||
if (sectionType == null) return null;
|
||||
return MyDocStyleList.Keys[MyDocStyleList.IndexOfValue((int)sectionType)];
|
||||
}
|
||||
public static int ToSectionType(string docStyleName)
|
||||
{
|
||||
return MyDocStyleList[docStyleName];
|
||||
}
|
||||
}
|
||||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) => new StandardValuesCollection((ICollection)MyDocStyleList.Keys);
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context) => true;
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) => true;
|
||||
public static int? ToInt(string docStyleName) => MyDocStyleList[docStyleName];
|
||||
public static string ToString(int? sectionType) => sectionType == null ? null : MyDocStyleList.Keys[MyDocStyleList.IndexOfValue((int)sectionType)];
|
||||
public static int ToSectionType(string docStyleName) => MyDocStyleList[docStyleName];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user