Advertisement
Guest User

Untitled

a guest
Feb 28th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using KCS_WHSWorkNotificationTest.WHSWorkNotification;
  11.  
  12. namespace KCS_WHSWorkNotificationTest
  13. {
  14. public partial class Form1 : Form
  15. {
  16. public Form1()
  17. {
  18. InitializeComponent();
  19. }
  20.  
  21. private void button1_Click(object sender, EventArgs e)
  22. {
  23. KCSWHSWorkNotificationClient servClient = new KCSWHSWorkNotificationClient();
  24. Response response = new Response();
  25. CallContext callContext = new CallContext();
  26. String resultDescription = "";
  27. String workId = "";
  28.  
  29. servClient.ClientCredentials.UserName.UserName = "ax-install-admin";
  30. servClient.ClientCredentials.UserName.Password = "%Go2KcS2015*";
  31. response = servClient.existsWorkForNotification(callContext, inventLocation.Text, zone.Text);
  32. if (response.WorkList != null)
  33. {
  34. foreach (WHSWorkNotification.WorkList workList in response.WorkList)
  35. {
  36. workId = workList.WorkId;
  37. if (workId == "")
  38. resultDescription += workId;
  39. }
  40. if (workId == "")
  41. resultDescription += "\n";
  42. }
  43. foreach (WHSWorkNotification.Result result in response.ResultList)
  44. {
  45. resultDescription += result.ResultDescription;
  46. resultDescription += "\n";
  47. }
  48. MessageBox.Show(resultDescription);
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement