54 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| 
 | |
| namespace AIMSObjectQuery
 | |
| {
 | |
|     internal partial class ChargesMap:IMap
 | |
| 	{
 | |
| 	    private Dictionary<string, string> dictionary = new Dictionary<string, string>();
 | |
|         public ChargesMap()
 | |
|         {
 | |
|         	dictionary.Add("id", "Id");
 | |
|         	dictionary.Add("code", "Code");
 | |
|         	dictionary.Add("name", "Name");
 | |
|         	dictionary.Add("helpcode", "HelpCode");
 | |
|         	dictionary.Add("printname", "PrintName");
 | |
|         	dictionary.Add("unit", "Unit");
 | |
|         	dictionary.Add("packunit", "PackUnit");
 | |
|         	dictionary.Add("price", "Price");
 | |
|         	dictionary.Add("stock", "Stock");
 | |
|         	dictionary.Add("group", "Group");
 | |
|         	dictionary.Add("bill", "Bill");
 | |
|         	dictionary.Add("audit", "Audit");
 | |
|         	dictionary.Add("form", "Form");
 | |
|         	dictionary.Add("class", "Class");
 | |
|         	dictionary.Add("yibaocode", "YiBaoCode");
 | |
|         	dictionary.Add("yibaoname", "YiBaoName");
 | |
|         	dictionary.Add("versionno", "VersionNo");
 | |
|         	dictionary.Add("zfbl", "ZFBL");
 | |
|         	dictionary.Add("comment", "Comment");
 | |
|         	dictionary.Add("isvalid", "IsValid");
 | |
|         }
 | |
| 
 | |
|         #region IMap 成员
 | |
| 
 | |
|         public string this[string propertyName]
 | |
|         {
 | |
|             get
 | |
| 			{ 
 | |
| 				try
 | |
| 				{
 | |
| 					return dictionary[propertyName.ToLower()]; 
 | |
| 				}
 | |
| 				catch (KeyNotFoundException)
 | |
| 				{
 | |
| 					throw new Exception(propertyName + "属性不存在");
 | |
| 				}
 | |
| 			}
 | |
|         }
 | |
| 
 | |
|         #endregion
 | |
| 	}
 | |
| }
 |