private ExpertBoard GetExpertBoard() { using (GmConnection conn = App.CreateConnection()) { return(ExpertBoard.GetExpertBoard(conn, SelectedId)); } }
public ExpertBoardForm(ExpertBoard expertBoard, Patient patient) { InitializeComponent(); this.expertBoard = expertBoard; this.patient = patient; FormUtils.Init(this); }
private void ucSelectReport_OnShowReport(object sender, HospitalDepartment.UserControls.SelectReportEventArgs e) { ExpertBoard expertBoard = GetExpertBoard(); if (expertBoard != null) { switch (BaseReportBuilder.GetReportBuilderId(e.Report.ReportBuilderId)) { case ReportBuilderId.ExpertBoard: e.ReportBuilder = new ExpertBoardReportBuilder(App.ConnectionFactory, App.Config, patient, expertBoard); break; } } }
private void btnAdd_Click(object sender, EventArgs e) { try { ExpertBoard expertBoard = new ExpertBoard(patient.Id); ExpertBoardForm form = new ExpertBoardForm(expertBoard, patient); if (form.ShowDialog() == DialogResult.OK) { DataRow newRow = dataTable.NewRow(); dataTable.Rows.Add(newRow); UpdateRow(newRow, expertBoard); } } catch (Exception ex) { Log.Exception(ex); } }
private void Open() { try { ExpertBoard expertBoard = GetExpertBoard(); if (expertBoard != null) { ExpertBoardForm form = new ExpertBoardForm(expertBoard, patient); if (form.ShowDialog() == DialogResult.OK) { UpdateRow(SelectedRow, expertBoard); } } } catch (Exception ex) { Log.Exception(ex); } }
public ExpertBoardReportBuilder(ConnectionFactory factory, Config config, Patient patient, ExpertBoard expertBoard) : base(ReportBuilderId.ExpertBoard) { AddParameter("SickListStartDate", patient.patientData.sickListStartDate); AddParameter("AdmissionDate", patient.admissionDate); AddParameter("Date", expertBoard.date); AddParameter("Diagnosis", expertBoard.expertBoardData.diagnosisInfo); AddParameter("DiagnosisCode", expertBoard.expertBoardData.diagnosisInfo.code); using (GmConnection conn = factory.CreateConnection()) { Diagnosis d = expertBoard.expertBoardData.diagnosisInfo.GetDiagnosis(conn); AddParameter("MCode", d.mcode); } }
private void UpdateRow(DataRow dr, ExpertBoard expertBoard) { dr["Id"] = expertBoard.Id; dr["Date"] = expertBoard.date; }