DefconDotNet

Untitled

Dec 19th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.57 KB | None | 0 0
  1.  
  2.     class Program
  3.     {
  4.         private static void Main()
  5.         {
  6.             DoIcpDeclaration();
  7.         }
  8.  
  9.         private static void DoIcpDeclaration()
  10.         {
  11.             Console.WriteLine("DoIcpDeclaration");
  12.  
  13.             // Create the declaration
  14.             var abcLeveringen = new List<Levering>
  15.                 {
  16.                     new Levering {BtwNummer = "DK07565643", Bedrag = "150"},
  17.                     new Levering {BtwNummer = "DE4544924DE02", Bedrag = "12"}
  18.                 };
  19.             var icpRequest = new AddIcpDeclarationRequest
  20.             {
  21.                 Gebruikersnaam = "test",
  22.                 GebruikersGuid = "test",
  23.                 BelanghebbendeNummer = "100010001B01",
  24.                 Periode = "M201311",
  25.                 Contactpersoon = "Jan Modaal",
  26.                 Straat = "Nachtegaallaan",
  27.                 Huisnummer = "1",
  28.                 Postcode = "5801AB",
  29.                 Woonplaats = "Venray",
  30.                 Telefoonnummer = "011-487415",
  31.                 AbcLeveringen = abcLeveringen.ToArray()
  32.             };
  33.  
  34.  
  35.             using (var declarationClient = new DeclarationServiceClient()) {
  36.                 // Make the call
  37.                 var response = declarationClient.SendICP(icpRequest);
  38.  
  39.                 // Display the results
  40.                 if (response.Success)
  41.                     Console.WriteLine("Succes! TraceId: {0}", response.TraceId);
  42.                 else
  43.                     Console.WriteLine("Error! {0}: {1}", response.ErrorCode, response.ErrorMessage);
  44.             }
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment