Guest User

Untitled

a guest
Dec 5th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. static public OrganizationServiceProxy CreateOrganization()
  2. {
  3. ClientCredentials cred1 = new ClientCredentials();
  4. cred1.UserName.UserName = _userName;
  5. cred1.UserName.Password = _password;
  6. ClientCredentials cred2 = new ClientCredentials();
  7. cred2.UserName.UserName = _deviceId;
  8. cred2.UserName.Password = _devicePass;
  9. OrganizationServiceProxy obj;
  10. if (_deviceId.Length > 0)
  11. obj = new OrganizationServiceProxy(
  12. new Uri(organizationUri),
  13. null,
  14. cred1,
  15. cred2);
  16. else
  17. obj = new OrganizationServiceProxy(
  18. new Uri(organizationUri),
  19. null,
  20. cred1,
  21. null);
  22. obj.EnableProxyTypes();
  23.  
  24. return obj;
  25.  
  26. }
  27. }
  28.  
  29. }
  30.  
  31. Limpiar();
  32.  
  33. }
  34.  
  35. private void Limpiar()
  36. {
  37. txtRut.Text = "";
  38. txtNombreCompleto.Text = "";
  39. txtTelefono.Text = "";
  40. txtCorreo.Text = "";
  41. }
Add Comment
Please, Sign In to add comment