private void mybutton1_Click(object sender, EventArgs e)
        {
            patient_history ph = new patient_history();

            C.runPerportPatient_history("select patientName,staffName , appointment.appointmentDate , appointment.chiefcomplaint,appointment.examination,appointment.medicalhistory,appointment.medicine,specializations.SpecializationsName , (select count(appointment.appointmentId ) from appointment,staff,patient,specializations where appointment.SpecializationsId=specializations.SpecializationsId and appointment.patientId=patient.patientId and appointment.staffId=staff.staffId and examined is not null and  patientName='" + mainfrorm.patientName + "'" + ") as rowcount from appointment,staff,patient,specializations where appointment.SpecializationsId=specializations.SpecializationsId and appointment.patientId=patient.patientId and appointment.staffId=staff.staffId and examined is not null and  patientName='" + mainfrorm.patientName + "'", ph);
            ph.Show();
        }
Example #2
0
        public static void runPerportPatient_history(string select, patient_history p, DataTable table = null)
        {
            //عشان اقوله لو الجدول فاضى هديله البيانات من عندى
            try
            {
                if (table == null)
                {
                    table = DB.GetData(select);
                }
                ReportDataSource rds = new ReportDataSource("DataSet1", table);

                p.report_patient_history.LocalReport.DataSources.Clear();
                p.report_patient_history.LocalReport.DataSources.Add(rds);
                p.report_patient_history.LocalReport.Refresh();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }