AIMS/AIMSEntity/ObjectQuery/NoticeContentMap.cs
2022-08-23 21:12:59 +08:00

42 lines
1.0 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
namespace AIMSObjectQuery
{
internal partial class NoticeContentMap:IMap
{
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
public NoticeContentMap()
{
dictionary.Add("id", "Id");
dictionary.Add("contents", "Contents");
dictionary.Add("releasetime", "ReleaseTime");
dictionary.Add("releasecount", "ReleaseCount");
dictionary.Add("operatorid", "OperatorId");
dictionary.Add("operatortime", "OperatorTime");
dictionary.Add("sendtype", "SendType");
dictionary.Add("systemtype", "SystemType");
}
#region IMap
public string this[string propertyName]
{
get
{
try
{
return dictionary[propertyName.ToLower()];
}
catch (KeyNotFoundException)
{
throw new Exception(propertyName + "属性不存在");
}
}
}
#endregion
}
}