private void FillPatientInfo(PatientInfoDto info, Exception ex)
{
this.info = info;
lblFeeType.Text = string.Empty;
lblFamilyAddress.Text = string.Empty;
lblContracts.Text = string.Empty;
lblNextReturn.Text = string.Empty;
lblHDDate.Text = string.Empty;
lblHDOther.Text = string.Empty;
lblBlood.Text = string.Empty;
lblInfectious.Text = string.Empty;
lblAddiction.Text = string.Empty;
if (info == null)
{
this.info = new PatientInfoDto();
this.info.PatientID = this.patient.PatientID;
this.info.FeeType = FeeTypeEnum.Government;
}
else
{
lblFeeType.Text = string.Format("{0}{1}",
HdisEnum.GetEnumText(info.FeeType),
info.FreeCardDate > DateTime.MinValue ? string.Format("({0})", info.FreeCardDate.ToString("yyyy-MM-dd")) : string.Empty);
lblFamilyAddress.Text = string.Format("{0} {1}", info.FamilyAddress.Trim(), info.Tel.Trim());
var sbContract = new StringBuilder();
if (!string.IsNullOrEmpty(info.Tel1))
{
sbContract.Append(string.Format("{0}({1}){2}", string.IsNullOrEmpty(info.Contacts1) ? "姓名" : info.Contacts1, string.IsNullOrEmpty(info.Relation1) ? "关系" : info.Relation1, info.Tel1));
}
if (!string.IsNullOrEmpty(info.Tel2))
{
if (sbContract.Length > 0)
sbContract.Append("、");
sbContract.Append(string.Format("{0}({1}){2}", string.IsNullOrEmpty(info.Contacts2) ? "姓名" : info.Contacts2, string.IsNullOrEmpty(info.Relation2) ? "关系" : info.Relation2, info.Tel2));
}
if (sbContract.Length > 0)
{
lblContracts.Text = sbContract.ToString();
}
if(!string.IsNullOrEmpty(info.NextReturnDoctor))
lblNextReturn.Text = string.Format("{0}({1})", info.NextReturnDoctor, info.NextReturnDate.ToString("yyyy-MM-dd"));
var hdDate = string.Empty;
if (info.HDStartDate.HasValue && info.HDStartDate.Value > DateTime.MinValue)
hdDate = string.Format("血透开始({0})", info.HDStartDate.Value.ToString("yyyy-MM-dd"));
var localHDDate = string.Empty;
if (info.LocalHDStartDate.HasValue && info.LocalHDStartDate.Value > DateTime.MinValue)
localHDDate = string.Format("本院血透开始({0})", info.LocalHDStartDate.Value.ToString("yyyy-MM-dd"));
lblHDDate.Text = HdisHelper.CreateSummary("、", hdDate, localHDDate);
var pdStart = string.Empty;
if (info.PDStartDate.HasValue && info.PDStartDate.Value > DateTime.MinValue)
pdStart = string.Format("腹膜开始({0})", info.PDStartDate.Value.ToString("yyyy-MM-dd"));
var pdEnd = string.Empty;
if (info.PDStopDate.HasValue && info.PDStopDate.Value > DateTime.MinValue)
pdEnd = string.Format("腹膜停止({0})", info.PDStopDate.Value.ToString("yyyy-MM-dd"));
var kt = string.Empty;
if (info.KTDate.HasValue && info.KTDate.Value > DateTime.MinValue)
kt = string.Format("肾移植({0})", info.KTDate.Value.ToString("yyyy-MM-dd"));
lblHDOther.Text = HdisHelper.CreateSummary("、", pdStart, pdEnd, kt);
lblBlood.Text = string.Format("{0} {1}", HdisEnum.GetEnumText(info.ABO), HdisEnum.GetEnumText(info.RH));
lblInfectious.Text = string.Format("{0}{1}", HdisEnum.GetEnumText(info.Infectious), string.IsNullOrEmpty(info.OtherInfection) ? string.Empty : "、" + info.OtherInfection);
lblAddiction.Text = HdisEnum.GetEnumText(info.AddictionHistory);
}
}
private void FillPatientRemark(PatientRemarkDto remark, Exception ex)
{
if (remark == null)
{
this.remark = new PatientRemarkDto();
this.remark.PatientID = this.patient.PatientID;
lblRemark.Text = string.Empty;
}
else
{
this.remark = remark;
lblRemark.Text = remark.Remark;
}
}
private void FillPatientFirstRecord(PatientFirstRecordDto firstRecord, Exception ex)
{
if (firstRecord == null)
{
this.firstRecord = new PatientFirstRecordDto();
this.firstRecord.PatientID = this.patient.PatientID;
txtFirstRecord.Text = string.Empty;
}
else
{
this.firstRecord = firstRecord;
txtFirstRecord.Text = firstRecord.FirstRecord;
}
}
这代码就两个意思
1、FillPatientInfo 填充病人资料。
2、FillPatientFirstRecord 填充病人第一个记录。
其他都可以忽略不计。
大叔 现在c#编程现在平均工资好低啊 程序员刚入门 想把更多的精力投入到工作中 多挣点钱 想听听大叔从业这么多年的感悟和对程序猿这份工作的评价
@糯米好吃: 不管哪个行业,如果平均工资高,入门门槛低得话,总是会有人进去拉低平均线的。
平均工资没有意义的。
再说了,高于平均工资你还是不会满足的。
有道理,程序猿能转管理层吗????感觉一直敲代码感觉肯定会被社会落下进度啊
控件赋值,数据填充
什么意思啊具体点好吗
你具体是哪里不懂呢。就是简单的赋值操作。如果等于null 值就是空 ,不是null 就赋其他值
那一段不懂?就是给控件赋值
尼玛这么多 if else
医疗行业,没搞头啦