private void mybutton1_Click(object sender, EventArgs e)
        {
            frmReportPatient p = new frmReportPatient();

            Clinic.C.RunReportpatient("select patient.patientId,patient.patientName,patient.phone,patient.email,patient.age,patient.gender,patient.address,faculty.facultyName,level.levelName, (select count(patientId) from patient,faculty,level where patient.facultyId=faculty.facultyId and patient.levelId=level.levelId  ) as countpatient  from patient,faculty,level where patient.facultyId=faculty.facultyId and patient.levelId=level.levelId  ", p);
            p.Show();
        }
Exemple #2
0
        //patient
        public static void RunReportpatient(string select, frmReportPatient p, DataTable table = null)
        {
            //عشان اقوله لو الجدول فاضى هديله البيانات من عندى
            try
            {
                if (table == null)
                {
                    table = DB.GetData(select);
                }
                ReportDataSource rds = new ReportDataSource("DataSet1", table);

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