private void tsBrowseRequest_Click(object sender, EventArgs e) { if (this.dataTableView1.SelectedRows.Count <= 0) { MessageBoxEx.ShowMessage("请选择申请浏览病历"); return; } PatVisitInfo patVisitInfo = this.dataTableView1.SelectedRows[0].Tag as PatVisitInfo; if (patVisitInfo == null) { return; } string szPatientID = patVisitInfo.PATIENT_ID; string szVisitID = patVisitInfo.VISIT_ID; string szPatientName = patVisitInfo.PATIENT_NAME; string szRequestID = SystemParam.Instance.UserInfo.USER_ID; List <RecBrowseRequest> lstRecBrowseRequest = null; short shRet = RecBrowseRequestAccess.Instance.GetList(szPatientID, szVisitID, szRequestID, ref lstRecBrowseRequest); if (lstRecBrowseRequest != null && lstRecBrowseRequest.Count > 0 && lstRecBrowseRequest[0].STATUS == 1) { MessageBoxEx.ShowMessage("审核已经通过,可直接打开浏览"); return; } RecBrowseRequestDialog dialog = new RecBrowseRequestDialog(); RecBrowseRequest recBrowseRequest = null; if (lstRecBrowseRequest == null) { recBrowseRequest = new RecBrowseRequest(); recBrowseRequest.DISCHARGE_TIME = patVisitInfo.DISCHARGE_TIME; recBrowseRequest.PATIENT_ID = patVisitInfo.PATIENT_ID; recBrowseRequest.VISIT_ID = patVisitInfo.VISIT_ID; recBrowseRequest.VISIT_NO = patVisitInfo.VISIT_NO; recBrowseRequest.PATIENT_NAME = patVisitInfo.PATIENT_NAME; recBrowseRequest.REQUEST_ID = SystemParam.Instance.UserInfo.USER_ID; recBrowseRequest.REQUEST_NAME = SystemParam.Instance.UserInfo.USER_NAME; recBrowseRequest.REQUEST_TIME = SysTimeHelper.Instance.Now; } else { recBrowseRequest = lstRecBrowseRequest[0]; } dialog.RecBrowseRequest = recBrowseRequest; if (dialog.ShowDialog() == DialogResult.OK) { } }
private void BrowseRequestDone(decimal status) { if (this.XDataGrid1.Rows.Count <= 0) { return; } short shRet = SystemData.ReturnValue.OK; string error = string.Empty; foreach (DataTableViewRow row in this.XDataGrid1.Rows) { if (row.Cells[this.col_Chk.Index].Value != null && row.Cells[this.col_Chk.Index].Value.ToString().ToLower() == "true") { RecBrowseRequest recBrowseRequest = row.Tag as RecBrowseRequest; recBrowseRequest.APPROVAL_NAME = SystemParam.Instance.UserInfo.USER_NAME; recBrowseRequest.APPROVAL_TIME = SysTimeHelper.Instance.Now; recBrowseRequest.STATUS = status; shRet = RecBrowseRequestAccess.Instance.Update(recBrowseRequest); if (shRet == SystemData.ReturnValue.OK) { row.Cells[this.col_APPROVAL_NAME.Index].Value = recBrowseRequest.APPROVAL_NAME; row.Cells[this.col_APPROVAL_TIME.Index].Value = DateTimeExtensions.ToDefaultString(recBrowseRequest.APPROVAL_TIME); row.Cells[this.col_STATUS.Index].Value = SystemData.BrowseRequestStatus.GetStatusName(recBrowseRequest.STATUS); } else { error += string.Format("第{0}行患者{1}病历审批处理失败;", row.Index + 1, recBrowseRequest.PATIENT_NAME); } } } if (error != string.Empty) { MessageBoxEx.ShowError(error); return; } }