1、头像转换判断空值和空字符串

msfy
lsm 10 months ago
parent 39fd30a814
commit 1dc02f434c
  1. 2
      PEIS/Model/ReportModel.cs
  2. 2
      PEIS/Utils/ReportHelper.cs

@ -187,7 +187,7 @@ namespace PEIS.Model
public List<Report> GetPacsPhoto(Int64 Eid) public List<Report> GetPacsPhoto(Int64 Eid)
{ {
var pacs = DAOHelp.GetDataBySQL<Report>($"select ReportImage from Report where EID = { Eid } AND ReportImage IS NOT NULL"); var pacs = DAOHelp.GetDataBySQL<Report>($"select ReportImage from Report where EID = { Eid } AND ReportImage IS NOT NULL");
var heart = DAOHelp.GetDataBySQL<Report>($"select ReportData AS ReportImage from Report_GSEXD where PatientNo = {Eid}"); var heart = DAOHelp.GetDataBySQL<Report>($"select ReportData AS ReportImage from Report_GSEXD where PatientNo = {Eid} AND ReportData IS NOT NULL");
if (heart.Count == 0) if (heart.Count == 0)
{ {

@ -242,7 +242,7 @@ namespace PEIS.Utils
rpt.SetParameterValue("HospitalName", Global._hospital.Name); rpt.SetParameterValue("HospitalName", Global._hospital.Name);
rpt.SetParameterValue("DeptName", patient.DeptName); rpt.SetParameterValue("DeptName", patient.DeptName);
if(patient.Photo == null) if(string.IsNullOrEmpty(patient.Photo))
{ {
rpt.SetParameterValue("Avatar", patient.Photo); rpt.SetParameterValue("Avatar", patient.Photo);
} }

Loading…
Cancel
Save