AIMS/AIMSEntity/ObjectQuery/ChargsTemplateMap.cs
2023-03-14 19:05:29 +08:00

43 lines
1.1 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
namespace AIMSObjectQuery
{
internal partial class ChargsTemplateMap:IMap
{
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
public ChargsTemplateMap()
{
dictionary.Add("id", "Id");
dictionary.Add("templatetype", "TemplateType");
dictionary.Add("templatename", "TemplateName");
dictionary.Add("hcode", "HCode");
dictionary.Add("connectid", "ConnectId");
dictionary.Add("defaultvalue", "DefaultValue");
dictionary.Add("isvalid", "IsValid");
dictionary.Add("operatorid", "OperatorId");
dictionary.Add("operatortime", "OperatorTime");
}
#region IMap
public string this[string propertyName]
{
get
{
try
{
return dictionary[propertyName.ToLower()];
}
catch (KeyNotFoundException)
{
throw new Exception(propertyName + "属性不存在");
}
}
}
#endregion
}
}