private void OnGenerateReportButtonClicked(object sender, EventArgs e) { var repository = new ExaminationsRepository(); var report = DoctorActivityReport.For(repository, doctorComboBox.SelectedDoctor, dateRange.StartDate, dateRange.EndDate); totalExaminationsTextBox.Text = report.ExaminationsCount.ToString(); totalAmountReceivedTextBox.Text = report.TotalAmountReceived.ToString(CultureInfo.InvariantCulture); }
private void ViewDoctorActivity(string[] args) { var doctor = GetDoctorByName(args[2]); var startDateTime = DateTime.Parse(args[3]); var endDateTime = DateTime.Parse(args[4]); var report = DoctorActivityReport.For(repository, doctor, startDateTime, endDateTime); System.Console.WriteLine("Total examinations: {0}", report.ExaminationsCount); System.Console.WriteLine("Total amount received: ${0}", report.TotalAmountReceived); }