52 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace AIMSObjectQuery
 | |
| {
 | |
|     internal partial class DrugsMap:IMap
 | |
| 	{
 | |
| 	    private Dictionary<string, string> dictionary = new Dictionary<string, string>();
 | |
|         public DrugsMap()
 | |
|         {
 | |
|         	dictionary.Add("id", "Id");
 | |
|         	dictionary.Add("name", "Name");
 | |
|         	dictionary.Add("helpcode", "HelpCode");
 | |
|         	dictionary.Add("drugkind", "DrugKind");
 | |
|         	dictionary.Add("stand", "Stand");
 | |
|         	dictionary.Add("dosageunit", "DosageUnit");
 | |
|         	dictionary.Add("unit", "Unit");
 | |
|         	dictionary.Add("userate", "UseRate");
 | |
|         	dictionary.Add("isvalid", "IsValid");
 | |
|         	dictionary.Add("operatorno", "OperatorNo");
 | |
|         	dictionary.Add("operatorname", "OperatorName");
 | |
|         	dictionary.Add("operatedate", "OperateDate");
 | |
|         	dictionary.Add("remark", "Remark");
 | |
|         	dictionary.Add("channel", "Channel");
 | |
|         	dictionary.Add("usedose1", "UseDose1");
 | |
|         	dictionary.Add("usedose2", "UseDose2");
 | |
|         	dictionary.Add("usedose3", "UseDose3");
 | |
|         	dictionary.Add("comment", "Comment");
 | |
|         }
 | |
| 
 | |
|         #region IMap 成员
 | |
| 
 | |
|         public string this[string propertyName]
 | |
|         {
 | |
|             get
 | |
| 			{ 
 | |
| 				try
 | |
| 				{
 | |
| 					return dictionary[propertyName.ToLower()]; 
 | |
| 				}
 | |
| 				catch (KeyNotFoundException)
 | |
| 				{
 | |
| 					throw new Exception(propertyName + "属性不存在");
 | |
| 				}
 | |
| 			}
 | |
|         }
 | |
| 
 | |
|         #endregion
 | |
| 	}
 | |
| }
 |