void iCommon_CheckLogSyncComplet(object sender, CheckLogSyncEventArgs e) { for (int i = 0; i < e.InhosID.Count; i++) { if (iCommon.Patient.InhosID == e.InhosID[i]) {//判断是否有当前病人的更新 string CurrentDCLID = ""; if (this.gridLogList.SelectedItem != null) { CurrentDCLID = (this.gridLogList.SelectedItem as Data.DoctorCheckLog).DCLID; } int Index = e.DCLID.IndexOf(CurrentDCLID); if (Index >= 0 && e.ChangeType[Index] == "UPDATE") { //判断是否有当前日志的更新,有则覆盖显示 Views.CheckLogDetailEventArgs logArg = new Views.CheckLogDetailEventArgs(); logArg.DCLID = CurrentDCLID; OnUpdateCheckLog(null, logArg); } for (int c = 0; c < e.DCLID.Count; c++) { if (e.DCLID[c] == CurrentDCLID) { continue; } Data.DoctorCheckLog checkLog = PatientCheckLog.Find(pcl => pcl.DCLID == e.DCLID[c]); if (checkLog != null) { if (e.ChangeType[c] == "UPDATE") { checkLog.MedicalLog = e.MedicalLog[c]; } else if (e.ChangeType[c] == "DELETE") { PatientCheckLog.Remove(checkLog); } } } return; } } }
public void ExeDeleteCheckLog(Data.DoctorCheckLog CheckLog) { PatientCheckLog.Remove(CheckLog); ExeShowCheckLogList(PatientCheckLog); }