//开始日期
var hdDate = string.Empty;
if (dto.HDStartDate.HasValue && dto.HDStartDate.Value > DateTime.MinValue)
hdDate = string.Format("开始({0})", dto.HDStartDate.Value.ToString("yyyy-MM-dd"));
var localHDDate = string.Empty;
if (dto.LocalHDStartDate.HasValue && dto.LocalHDStartDate.Value > DateTime.MinValue)
localHDDate = string.Format("本院开始({0})", dto.LocalHDStartDate.Value.ToString("yyyy-MM-dd"));
info.InfoViewDto.HDDate = HdisHelper.CreateSummary("、", hdDate, localHDDate);
你直接拿ilspy或者reflector反编译了看下就知道了
m没有完整的代码。反编译不了的。
@糯米好吃: 是.net的dll么?反编译又不需要代码。
@Daniel Cai: 我做前台 我们的大师傅把一段代码给的我
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);
}
}
@糯米好吃: 你能编译的过去么?能编译过去找到对应的dll在那些反编译的程序中找啊,我们都不知道你要做的是什么,好比你突然给我个黑盒子,然后问我怎么做到黑盒子一样的效果。
编译不过去 需要重新编写 HdisHelper.CreateSummary这个函数,这个函数的作用是如果有血透开始那么就选择出血透开始时间,如果有本院血透开始那么就选择出本院血透开始时间,如果都有则全部选出。多谢老菜鸟粑粑