Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.ServiceModel;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Service;
  8.  
  9. namespace Client
  10. {
  11. class Program
  12. {
  13. static Service1 service = new Service1();
  14. static List<Lot> loty = new List<Lot>();
  15. static void Main(string[] args)
  16. {
  17. try
  18. {
  19. loty = service.GetLots("Londyn", "Poznan", DateTime.Parse("01.01.0001 00:00:00"), DateTime.Parse("01.01.0001 00:00:00"));
  20.  
  21. foreach(Lot lot in loty)
  22. {
  23. Console.WriteLine("Lot z: " + lot.skad.miasto + " do: " + lot.dokad.miasto + ": Odlot " + lot.godzinaOdlotu + ", szacowana godzina przylotu: " + lot.godzinaPrzylotu);
  24. }
  25. }
  26. catch(FaultException<LotNieZnalezionoExeption> e)
  27. {
  28.  
  29. Console.WriteLine(e.Detail.Message);
  30. }
  31. Console.ReadLine();
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement