using System; using System.Collections; using System.Collections.Generic; namespace AIMSObjectQuery { internal partial class PrintDocumentMap:IMap { private Dictionary dictionary = new Dictionary(); public PrintDocumentMap() { dictionary.Add("id", "Id"); dictionary.Add("patientid", "PatientId"); dictionary.Add("templateid", "TemplateId"); dictionary.Add("xmlfilename", "XmlFileName"); dictionary.Add("xmlfile", "XmlFile"); dictionary.Add("xmlstatic", "XmlStatic"); dictionary.Add("isvalid", "IsValid"); dictionary.Add("operatorno", "OperatorNo"); dictionary.Add("operatordate", "OperatorDate"); } #region IMap 成员 public string this[string propertyName] { get { try { return dictionary[propertyName.ToLower()]; } catch (KeyNotFoundException) { throw new Exception(propertyName + "属性不存在"); } } } #endregion } }