/*将SectionInfo对应的Entity翻译为数据契约*/ private void TranslateSectionInfoEntityToSectionInfoContractData( SectionInfoEntity sectionInfoEntity, SectionInfo sectionInfo) { sectionInfo.ErrorMessage = sectionInfoEntity.ErrorMessage; sectionInfo.HospitalID = sectionInfoEntity.HospitalID; sectionInfo.SectionID = sectionInfoEntity.SectionID; sectionInfo.Place = sectionInfoEntity.Place; sectionInfo.Name = sectionInfoEntity.Name; sectionInfo.Phone = sectionInfoEntity.Phone; sectionInfo.Fax = sectionInfoEntity.Fax; }
/*获取特定科室信息:提交SectionID,返回该科室的信息*/ public SectionInfo GetSectionInfo(string sectionID) { SectionInfoEntity sectionInfoEntity = null; if (sectionID == null) { sectionInfoEntity = new SectionInfoEntity(); sectionInfoEntity.ErrorMessage = "112 Empty sectionID! @Service"; } else { sectionInfoEntity = openAccessLogic.GetSectionInfo(sectionID); } SectionInfo sectionInfo = new SectionInfo(); TranslateSectionInfoEntityToSectionInfoContractData(sectionInfoEntity, sectionInfo); return sectionInfo; }