Beispiel #1
0
        /// <summary>
        /// 获取某专员的评论列表 SYF 20151026
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="DoctorId"></param>
        /// <param name="CategoryCode"></param>
        /// <returns></returns>
        public List<CommentList> GetCommentList(DataConnection pclsCache, string DoctorId, string CategoryCode)
        {
            List<CommentList> list = new List<CommentList>();
            List<DetailsByDoctorId> list1 = new List<DetailsByDoctorId>();
            try
            {
                list1 = GetDetailsByDoctorId(pclsCache, DoctorId, CategoryCode);//获取健康专员所负责的病人对他的评价及评分信息
                if (list1 != null)
                {
                    for (int i = 0; i < list1.Count; i++)
                    {
                        CommentList clt = new CommentList();
                        clt.CategoryCode = list1[i].CategoryCode;
                        clt.PatientId = list1[i].PatientId;
                        clt.Name = list1[i].Name;
                        clt.Comment = list1[i].Comment;
                        clt.Score = list1[i].Score;
                        string[] DateAndTime = list1[i].CommentTime.Split(' ');//日期和时间分开
                        string Date = DateAndTime[0];
                        string[] YMD = Date.Split('/');//年月日分开
                        string month = YMD[1];
                        string day = YMD[2];
                        if(month.Length<2)
                        {
                            month = "0" + month;
                        }
                        if (day.Length < 2)
                        {
                            day = "0" + day;
                        }
                        clt.CommentTime = YMD[0] + "-" + month + "-" + day + " " + DateAndTime[1];

                        if (clt.PatientId != "")
                        {
                            //PatientDetailInfo1 ret = new PatientDetailInfo1();
                            GetPatientDetailInfo lt = new GetPatientDetailInfo();
                            lt = GetPatientDetailInfo(pclsCache, clt.PatientId);
                            if (lt != null)
                            {
                                clt.imageURL = lt.PhotoAddress;
                            }
                        }
                        list.Add(clt);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UserMethod.GetCommentList", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }
Beispiel #2
0
        /// <summary>
        /// 获取某专员的评论列表 SYF 20151026
        /// </summary>
        /// <param name="pclsCache"></param>
        /// <param name="DoctorId"></param>
        /// <param name="CategoryCode"></param>
        /// <returns></returns>
        public List<CommentList> GetCommentList(DataConnection pclsCache, string DoctorId, string CategoryCode)
        {
            List<CommentList> list = new List<CommentList>();
            List<DetailsByDoctorId> list1 = new List<DetailsByDoctorId>();
            try
            {
                list1 = GetDetailsByDoctorId(pclsCache, DoctorId, CategoryCode);//获取健康专员所负责的病人对他的评价及评分信息
                if (list1 != null)
                {
                    for (int i = 0; i < list1.Count; i++)
                    {
                        CommentList clt = new CommentList();
                        clt.PatientId = list1[i].PatientId;
                        clt.Name = list1[i].Name;
                        clt.Comment = list1[i].Comment;
                        clt.Score = list1[i].Score;
                        clt.CommentTime = list1[i].CommentTime;

                        if (clt.PatientId != "")
                        {
                            //PatientDetailInfo1 ret = new PatientDetailInfo1();
                            GetPatientDetailInfo lt = new GetPatientDetailInfo();
                            lt = GetPatientDetailInfo(pclsCache, clt.PatientId);
                            if (lt != null)
                            {
                                clt.imageURL = lt.PhotoAddress;
                            }
                        }
                        list.Add(clt);
                    }
                }
                return list;
            }
            catch (Exception ex)
            {
                HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "UserMethod.GetCommentList", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace);
                return null;
            }
            finally
            {
                pclsCache.DisConnect();
            }
        }