private void Display(Scan scan) { Util.Print("ScanType", scan.ScanType); Util.Print("PIN", scan.PIN.Value); Util.Print("Depot name", scan.Depot.Name); Util.Print("ScanDate", scan.ScanDate); Util.Print("ScanTime", scan.ScanTime); Util.Print("Description", scan.Description); Util.Print("Comment", scan.Comment); Util.Print("SummaryScanIndicator", scan.SummaryScanIndicator); Util.Push(); if (scan is ProofOfPickUpScan) Display(((ProofOfPickUpScan)scan).ScanDetails); else if (scan is DeliveryScan) Display(((DeliveryScan)scan).ScanDetails); else if (scan is OnDeliveryScan) Display(((OnDeliveryScan)scan).ScanDetails); Util.Pop(); }
private void Display(Scan[] scans) { Console.WriteLine("Scans:"); if (scans != null && scans.Length > 0) { int i = 0; foreach (Scan scan in scans) { i++; Util.Print("Scan", i); Util.Push(); Display(scan); Util.Pop(); } } else { Util.Print("Scans not available"); } }