Пример #1
0
 private void InitialiseErpConnectLicense()
 {
     try
     {
         Log.Information("Initialising and Checking License for ERPConnect");
         LIC.SetLic(sapConfig.ErpConnectLicense);
     }
     catch (Exception exception)
     {
         Log.Error(exception, $"Could not register ERPConnect License Code: {sapConfig.ErpConnectLicense}");
     }
 }
        public BusinessSAP()
        {
            string User          = ConfigurationManager.AppSettings["User"].ToString();
            string AppServerHost = ConfigurationManager.AppSettings["AppServerHost"].ToString();
            int    SystemNumber  = Convert.ToInt32(ConfigurationManager.AppSettings["SystemNumber"].ToString());
            string Password      = Encriptador.Desencriptar(ConfigurationManager.AppSettings["Password"].ToString(), true);
            string Client        = ConfigurationManager.AppSettings["Client"].ToString();
            string Language      = ConfigurationManager.AppSettings["Language"].ToString();
            string Licencia      = ConfigurationManager.AppSettings["Licencia"].ToString();

            LIC.SetLic(Licencia);

            ConectorSAP = new R3Connection(AppServerHost, SystemNumber, User, Password, Language, Client);
        }
Пример #3
0
 public SapService(string sapConnectionString, string license)
 {
     _sapConnectionString = !string.IsNullOrWhiteSpace(sapConnectionString) ? sapConnectionString : throw new ArgumentException(nameof(sapConnectionString));
     _license             = !string.IsNullOrWhiteSpace(license) ? license : throw new ArgumentException(nameof(license));
     LIC.SetLic(_license);
 }