public void ProcessData(string inOib)
 {
     try
     {
         Person person = _repository.GetPersonByOib(inOib);
         _printer.PrintReport(person);
     }
     catch (PersonDoesNotExistException e)
     {
         throw;
     }
 }
Beispiel #2
0
 public void PrintReport(string reportType, ReportDto report)
 {
     if (reportType.ToLower() == "j")
     {
         SetStrategy(new ReportPrintToJson());
     }
     else if (reportType.ToLower() == "t")
     {
         SetStrategy(new ReportPrintToTxt());
     }
     else if (reportType.ToLower() == "c")
     {
         SetStrategy(new ConsoleReportPrinter());
     }
     else
     {
         throw new Exception("There is no such export option!");
     }
     _reportPrinter.PrintReport(report);
 }
Beispiel #3
0
 public void PrintReport(string report) =>
 reportPrinter.PrintReport(report);
Beispiel #4
0
        public void CompileReport()
        {
            var output = _currentFormatter.OutputFormat(_employeeReport.GetEmployees());

            _currentPrinter.PrintReport(output);
        }
Beispiel #5
0
 public void Cos()
 {
     formater.FormatDocument(document);
     printer.PrintReport(document);
 }