private void OnGenerateReportButtonClicked(object sender, System.EventArgs e) { var repository = new ExaminationsRepository(); var report = ClinicActivityReport.For(repository, dateRange.StartDate, dateRange.EndDate); totalExaminationsDurationTextBox.Text = report.TotalExaminationsDuration.ToString(); totalAmountReceivedTextBox.Text = report.TotalAmountReceived.ToString(CultureInfo.InvariantCulture); }
private void ViewClinicActivity(string[] args) { var startDateTime = DateTime.Parse(args[2]); var endDateTime = DateTime.Parse(args[3]); var report = ClinicActivityReport.For(repository, startDateTime, endDateTime); System.Console.WriteLine("Total examinations duration: {0}", report.TotalExaminationsDuration); System.Console.WriteLine("Total amount received: ${0}", report.TotalAmountReceived); }