public static List <ParameterType> GetDataSourceParamType(String typeCode) { String path = DataCenter.GetAppPath() + "\\config\\ParameterType.xml"; List <ParameterType> list = (List <ParameterType>)XmlConvertor.Deserialize(typeof(List <ParameterType>), path); List <ParameterType> list2 = new List <ParameterType>(); foreach (ParameterType type in list) { if (type.TYPECODE.ToString() == typeCode) { list2.Add(type); } } return(list2); }
public static Dictionary <long, ParameterType> GetParamType() { if (paramType != null) { return(paramType); } Dictionary <long, ParameterType> dictionary = new Dictionary <long, ParameterType>(); String path = DataCenter.GetAppPath() + @"\\config\\ParameterType.xml"; List <ParameterType> list = (List <ParameterType>)XmlConvertor.Deserialize(typeof(List <ParameterType>), path); list.Sort(new ParameterTypeCompare()); foreach (ParameterType type in list) { if (type.TYPECODE != 0L) { dictionary[type.TYPECODE] = type; } } return(dictionary); }