Created
February 23, 2021 09:12
-
-
Save amarodeabreu/d18ff61bfa943d0880ce7b7764ba283f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Do SYSPRO login | |
/// </summary> | |
/// <param name="userName"></param> | |
/// <param name="password"></param> | |
/// <param name="company"></param> | |
/// <param name="companyPassword"></param> | |
/// <returns>XmlDocument</returns> | |
public static void DoLogin( | |
string userName, | |
string password, | |
string company, | |
string companyPassword) | |
{ | |
//the binding to use | |
var clientPrim = new SYSPROWCFServicesPrimitiveClient(Properties.Settings.Default.WCF_Rest, SYSPROWCFBinding.NetTcp); | |
// Subscribe to the logon call back event | |
clientPrim.LogonCallBack += LogonCallBack; | |
//Finally call the Asynchronous method for logon | |
clientPrim.LogonAsync(userName, password, company, companyPassword, "", "", Properties.Settings.Default.SYSPROInstance, ""); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment