Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.ServiceModel;
- using System.Text;
- using System.Threading.Tasks;
- using Service;
- namespace Client
- {
- class Program
- {
- static Service1 service = new Service1();
- static List<Lot> loty = new List<Lot>();
- static void Main(string[] args)
- {
- try
- {
- loty = service.GetLots("Londyn", "Poznan", DateTime.Parse("01.01.0001 00:00:00"), DateTime.Parse("01.01.0001 00:00:00"));
- foreach(Lot lot in loty)
- {
- Console.WriteLine("Lot z: " + lot.skad.miasto + " do: " + lot.dokad.miasto + ": Odlot " + lot.godzinaOdlotu + ", szacowana godzina przylotu: " + lot.godzinaPrzylotu);
- }
- }
- catch(FaultException<LotNieZnalezionoExeption> e)
- {
- Console.WriteLine(e.Detail.Message);
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement