55 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace AIMSObjectQuery
 | |
| {
 | |
|     internal partial class OperationTemplateMap:IMap
 | |
| 	{
 | |
| 	    private Dictionary<string, string> dictionary = new Dictionary<string, string>();
 | |
|         public OperationTemplateMap()
 | |
|         {
 | |
|         	dictionary.Add("id", "Id");
 | |
|         	dictionary.Add("templatename", "TemplateName");
 | |
|         	dictionary.Add("typeid", "TypeId");
 | |
|         	dictionary.Add("itemkindname", "ItemKindName");
 | |
|         	dictionary.Add("inroomtime", "InRoomTime");
 | |
|         	dictionary.Add("itemid", "ItemId");
 | |
|         	dictionary.Add("begintime", "BeginTime");
 | |
|         	dictionary.Add("endtime", "EndTime");
 | |
|         	dictionary.Add("value", "Value");
 | |
|         	dictionary.Add("dosageunit", "DosageUnit");
 | |
|         	dictionary.Add("drugchannel", "DrugChannel");
 | |
|         	dictionary.Add("givedrugtype", "GiveDrugType");
 | |
|         	dictionary.Add("operatorno", "OperatorNo");
 | |
|         	dictionary.Add("operatorname", "OperatorName");
 | |
|         	dictionary.Add("operatedate", "OperateDate");
 | |
|         	dictionary.Add("ispublic", "IsPublic");
 | |
|         	dictionary.Add("spare1", "Spare1");
 | |
|         	dictionary.Add("spare2", "Spare2");
 | |
|         	dictionary.Add("spare3", "Spare3");
 | |
|         	dictionary.Add("spare4", "Spare4");
 | |
|         	dictionary.Add("spare5", "Spare5");
 | |
|         }
 | |
| 
 | |
|         #region IMap 成员
 | |
| 
 | |
|         public string this[string propertyName]
 | |
|         {
 | |
|             get
 | |
| 			{ 
 | |
| 				try
 | |
| 				{
 | |
| 					return dictionary[propertyName.ToLower()]; 
 | |
| 				}
 | |
| 				catch (KeyNotFoundException)
 | |
| 				{
 | |
| 					throw new Exception(propertyName + "属性不存在");
 | |
| 				}
 | |
| 			}
 | |
|         }
 | |
| 
 | |
|         #endregion
 | |
| 	}
 | |
| }
 |