Advertisement
Guest User

Untitled

a guest
Jun 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. using System.Web.Services;
  2.  
  3.  
  4. namespace Webservice
  5. {
  6. [WebService(Namespace = "http://mojastrona.pl/")]
  7. [WebServiceBinding(ConfirmsTo = WsiProfiles.BasicProfile1_1)]
  8. [System.ComponentModel.ToolboxItem(false)]
  9.  
  10.  
  11. public class IOservice : openbaza
  12. {
  13. public Autoryzo Autoryzo { get; set; }
  14. [WebMethod(Description = ("Ogarnianie ktory sie zalogowal"))]
  15. [Autoryzacja("Autoryzo")]
  16. public string2=" ";
  17. public string Logowanie(string login,string passwd)
  18. {
  19. if (polaczenie.State == ConnectionState.Open)
  20. {
  21. if (AuthorizeUser(Autoryacja) == true)
  22. {
  23. string2=UserName+Password;
  24.  
  25. }
  26.  
  27. }
  28.  
  29. }
  30.  
  31.  
  32. return string2;
  33. }
  34. public class Autoryzo : Autoryzacja
  35. {
  36. public string UserName { get; set; }
  37. public string Password { get; set; }
  38. }
  39. private static bool AuthorizeUser(Autoryzajca user)
  40. {
  41. if (user.UserName == ZapytanieSQL.imie.ToString() && user.Password == ZapytanieSQL.password.ToString())
  42. {
  43. return true;
  44. }
  45. return false;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement