private void btnQuery_Click(object sender, EventArgs e) { try { QueryCondiction query = new QueryCondiction(); if (!string.IsNullOrEmpty(txtExameNo.Text.Trim())) { query.ExamineNo = txtExameNo.Text.Trim(); } if (!string.IsNullOrEmpty(txtPatName.Text.Trim())) { query.Name = txtPatName.Text.Trim(); } if (dtpExameBeginDate.Checked) { query.ExamineBeginDate = dtpExameBeginDate.Value; } else { query.ExamineBeginDate = null; } if (dtpExameEndDate.Checked) { query.ExamineEndDate = dtpExameEndDate.Value; } else { query.ExamineEndDate = null; } List <PhysicalExaminePatient> lstPatient = process.GetPatientList(query); this.dataGridView1.AutoGenerateColumns = false; this.dataGridView1.DataSource = lstPatient; } catch (Exception error) { MessageBox.Show(error.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 查询病人列表 /// </summary> /// <param name="qc"></param> /// <returns></returns> public abstract List <PhysicalExaminePatient> GetPatientList(QueryCondiction qc);