42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AIMSObjectQuery
|
|
{
|
|
internal partial class InstrumentRegistrationMap:IMap
|
|
{
|
|
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
|
public InstrumentRegistrationMap()
|
|
{
|
|
dictionary.Add("id", "Id");
|
|
dictionary.Add("name", "Name");
|
|
dictionary.Add("numbers", "Numbers");
|
|
dictionary.Add("performance", "Performance");
|
|
dictionary.Add("intact", "Intact");
|
|
dictionary.Add("operatorname", "OperatorName");
|
|
dictionary.Add("operatortime", "OperatorTime");
|
|
dictionary.Add("remark", "Remark");
|
|
}
|
|
|
|
#region IMap 成员
|
|
|
|
public string this[string propertyName]
|
|
{
|
|
get
|
|
{
|
|
try
|
|
{
|
|
return dictionary[propertyName.ToLower()];
|
|
}
|
|
catch (KeyNotFoundException)
|
|
{
|
|
throw new Exception(propertyName + "属性不存在");
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|