42 lines
		
	
	
		
			1005 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1005 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace AIMSObjectQuery
 | |
| {
 | |
|     internal partial class DosageUnitMap:IMap
 | |
| 	{
 | |
| 	    private Dictionary<string, string> dictionary = new Dictionary<string, string>();
 | |
|         public DosageUnitMap()
 | |
|         {
 | |
|         	dictionary.Add("id", "Id");
 | |
|         	dictionary.Add("name", "Name");
 | |
|         	dictionary.Add("unittype", "UnitType");
 | |
|         	dictionary.Add("helpcode", "HelpCode");
 | |
|         	dictionary.Add("isvalid", "IsValid");
 | |
|         	dictionary.Add("operatorno", "OperatorNo");
 | |
|         	dictionary.Add("operatorname", "OperatorName");
 | |
|         	dictionary.Add("operatedate", "OperateDate");
 | |
|         }
 | |
| 
 | |
|         #region IMap 成员
 | |
| 
 | |
|         public string this[string propertyName]
 | |
|         {
 | |
|             get
 | |
| 			{ 
 | |
| 				try
 | |
| 				{
 | |
| 					return dictionary[propertyName.ToLower()]; 
 | |
| 				}
 | |
| 				catch (KeyNotFoundException)
 | |
| 				{
 | |
| 					throw new Exception(propertyName + "属性不存在");
 | |
| 				}
 | |
| 			}
 | |
|         }
 | |
| 
 | |
|         #endregion
 | |
| 	}
 | |
| }
 |