private void Button_Clicked(object sender, EventArgs e)
        {
            string username = txtUsername.Text;
            string password = txtPassword.Text;

            if (LoginExampleCode.Login(username, password))
            {
                lblLoginResult.Text = $"Login successfull, token: {LoginExampleCode.LoginToken}";
            }
            else
            {
                lblLoginResult.Text = "Login failed.";
            }
        }
예제 #2
0
 public static bool Login(string username, string password)
 {
     ReglaWS.ReglaWebServiceSoapClient rws = LoginExampleCode.ReglaWebServiceSoapClient();
     ReglaWS.MethodResult result           = rws.LoginWithComment(username, password, "NTV Prufu Login");
     if (result.Success)
     {
         String newtoken = result.Messages[0];
         LoginToken = newtoken;
         return(true);
     }
     else
     {
         return(false);
     }
 }