private void btnQuery_Click(object sender, EventArgs e)
        {
            TimeSpan span = dtpTo.Value - dtpFrom.Value;

            if ((span.Days + 1) > 7)
            {
                MessageBox.Show("时间最大范围不能超过7天", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            try
            {
                OutPatient[] patients  = null;
                string       beginDate = dtpFrom.Value.ToString("yyyy-MM-dd") + " 00:00:00";
                string       endDate   = dtpTo.Value.ToString("yyyy-MM-dd") + " 23:59:59";
                string       invoiceNo = txtInvoiceNo.Text.Trim();

                if (txtPatient.Text.Trim( ) != "")
                {
                    patients = OutPatient.GetPatient("PatName<>'' AND PatName like '%" + txtPatient.Text.Trim( ) + "%'");
                }
                else
                {
                    patients = OutPatient.GetPatientByPresDate(beginDate, endDate);
                }
                if (txtInvoiceNo.Text.Trim( ) != "")
                {
                    OutPatient patient = new OutPatient(txtInvoiceNo.Text, OPDBillKind.门诊收费发票);
                    patients = new OutPatient[] { patient };
                }

                List <Prescription> listPrescription = new List <Prescription>();
                for (int i = 0; i < patients.Length; i++)
                {
                    Prescription[] prescriptions = patients[i].GetPrescriptions(PresStatus.全部, true, beginDate, endDate, invoiceNo, 0);
                    for (int j = 0; j < prescriptions.Length; j++)
                    {
                        prescriptions[j].PatientName = patients[i].PatientName;
                    }

                    listPrescription.AddRange(prescriptions);
                }
                ShowPrescriptions(listPrescription.ToArray());
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }