Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using SAPbobsCOM;
  6. using PR_Backend.Models;
  7.  
  8. namespace PR_Backend.Helpers
  9. {
  10. public static class DIApi
  11. {
  12. public static List<OnlineCompany> companyLoggedIn = new List<OnlineCompany>();
  13. public static List<OnlineCompany> apvCompanyOnline = new List<OnlineCompany>();
  14. public static Company _oCompany;
  15. public static bool _connect;
  16.  
  17. public static SAPbobsCOM.Company LoginSAP(string address, string dbName, string userName, string password)
  18. {
  19. Company oCompany = new Company();
  20. oCompany.LicenseServer = address;
  21. oCompany.language = BoSuppLangs.ln_English;
  22. oCompany.UseTrusted = false;
  23.  
  24. oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2012;
  25.  
  26. oCompany.Server = "172.24.11.161";
  27. oCompany.DbUserName = "sa";
  28. oCompany.DbPassword = "B1Admin";
  29. oCompany.CompanyDB = dbName;
  30. oCompany.UserName = userName;
  31. oCompany.Password = password;
  32. return oCompany;
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement