コード例 #1
0
 /*读取化验单*/
 public ExaminationInfo GetExaminationInfo(string sExaminationID) {
     ExaminationInfo examinationInfo = new ExaminationInfo();
     Guid gExaminationID = Guid.Empty;
     try {
         gExaminationID = new Guid(sExaminationID);
     }
     catch {
         examinationInfo.ErrorMessage = "Invalid ID! @Service";
         return examinationInfo;
     }
     ExaminationInfoEntity examinationInfoEntity = doctorLogic.GetExaminationInfo(gExaminationID);
     TranslateExaminationInfoEntityToExaminationInfoContractData(examinationInfoEntity, examinationInfo);
     return examinationInfo;
 }
コード例 #2
0
 /*将ExaminationInfo对应的Entity翻译为数据契约*/
 private void TranslateExaminationInfoEntityToExaminationInfoContractData(
     ExaminationInfoEntity examinationInfoEntity,
     ExaminationInfo examinationInfo) {
     examinationInfo.ErrorMessage = examinationInfoEntity.ErrorMessage;
     examinationInfo.ExaminationID = examinationInfoEntity.ExaminationID.ToString();
     examinationInfo.Date = examinationInfoEntity.Date;
     examinationInfo.Type = examinationInfoEntity.Type;
     examinationInfo.Text = examinationInfoEntity.Text;
     examinationInfo.Advice = examinationInfoEntity.Advice;
     examinationInfo.Image = examinationInfoEntity.Image;
 }
コード例 #3
0
 /*读取化验单*/
 public ExaminationInfo GetExaminationInfo(string userID, string password, string sExaminationID) {
     UserService userService = new UserService();
     UserInfo userInfo = userService.Login(userID, password);
     if (userInfo.ErrorMessage == null) {
         return userService.GetExaminationInfo(sExaminationID);
     }
     else {
         ExaminationInfo    examinationInfo =  new ExaminationInfo();
         examinationInfo.ErrorMessage = userInfo.ErrorMessage;
         return examinationInfo;
     }
 }