Advertisement
Guest User

Untitled

a guest
May 9th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. //Creating a new instance
  2. AUVService.ServiceClient auvclient = new AUVService.ServiceClient();
  3.  
  4. //Setting username and password
  5. auvclient.ClientCredentials.UserName.UserName = "****";
  6. auvclient.ClientCredentials.UserName.Password = "****";
  7.  
  8. //Open the client (THIS WORKS)
  9. auvclient.Open();
  10.  
  11.  
  12. //Creating new order object
  13. AUVService.order or = new AUVService.order();
  14.  
  15. //Create new object holding the order lines
  16. AUVService.orderLine[] ol = new AUVService.orderLine[1];
  17.  
  18. //Create one new orderline
  19. ol[0] = new AUVService.orderLine();
  20.  
  21. ol[0].skuNumber = "1211199";
  22. ol[0].quantity = 1;
  23.  
  24. //Set the orderlines
  25. or.lines = ol;
  26.  
  27. //Tell the server that this order is created by Animedic and is only viewable for me
  28. or.username = "Animedic";
  29.  
  30. try
  31. {
  32. //Do the job, create the order
  33. auvclient.CreateOrder(or);
  34. }
  35. catch (Exception E)
  36. {
  37. MessageBox.Show(E.Message);
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement