public static void Initialize(GlobalServerComponent vismaConnection) { object dictionaryObj; //Används som inparameter i bcGetSrvDictioanry då den bara tar Object. //Anv dictionary-objektet för att dynamiskt hämta objektid:n för egendefinerade fält. vismaConnection.bcGetSrvDictionary(out dictionaryObj); //dictionaryObj får en referens var dictComp = (ISrvDictionary)dictionaryObj; //Hämta objekt-id:n för egendefinierade fält. ArticleZUsrPimSku = dictComp.bcGetObjectIDFromName("ZUsrPimSku", (int)GLOBAL_Components.BC_Article); ArticleZUsrLuthmanKortTextDen = dictComp.bcGetObjectIDFromName("ZUsrLuthmanKortTextDAN", (int)GLOBAL_Components.BC_Article); ArticleZUsrLuthmanKortTextSwe = dictComp.bcGetObjectIDFromName("ZUsrLuthmanKortTextSWE", (int)GLOBAL_Components.BC_Article); ArticleZUsrLuthmanKortTextNor = dictComp.bcGetObjectIDFromName("ZUsrLuthmanKortTextNOR", (int)GLOBAL_Components.BC_Article); if (ArticleZUsrPimSku == 0 || ArticleZUsrLuthmanKortTextDen == 0 || ArticleZUsrLuthmanKortTextSwe == 0 || ArticleZUsrLuthmanKortTextNor == 0) { Log.ForCurrent.InfoFormat("ZUsrPimSku = {0}", ArticleZUsrPimSku); Log.ForCurrent.InfoFormat("ZUsrLuthmanKortTextDan = {0}", ArticleZUsrLuthmanKortTextDen); Log.ForCurrent.InfoFormat("ZUsrLuthmanKortTextSwe = {0}", ArticleZUsrLuthmanKortTextSwe); Log.ForCurrent.InfoFormat("ZUsrLuthmanKortTextNor = {0}", ArticleZUsrLuthmanKortTextNor); throw new PimIntegrationConfigurationException("Failed to initalize ZUsrFields. Check log file for clues."); } System.Runtime.InteropServices.Marshal.ReleaseComObject(dictComp); System.Runtime.InteropServices.Marshal.ReleaseComObject(dictionaryObj); }
private static string GetNameOfClient(GlobalServerComponent connection) { string name; int connectionNo; connection.bcGetDataConnectionInfo(out connectionNo, out name); return(name); }
public VismaConnection(string clientName, string user, string password, string bapiKey) { _connection = new GlobalServerComponent(); _clientName = clientName; _user = user; _password = EncryptPassword(password); _bapiKey = bapiKey; }
public static BusinessComponentNavigate GetBusinessComponent(this GlobalServerComponent globalSrvComponent, GLOBAL_Components componentId) { var comp = (BusinessComponentNavigate)globalSrvComponent.bcBusinessComponent[(int)componentId]; comp.bcEstablishData(); comp.bcBindData(); return(comp); }
public static SalesOrderServerComponent GetSalesOrderServerComponent(this GlobalServerComponent globalSrvComponent) { var comp = (SalesOrderServerComponent)globalSrvComponent.bcBusinessComponent[(int)GLOBAL_Components.BC_SalesOrder]; comp.bcEstablishData(); comp.bcBindData(); return(comp); }
public SalesOrderManager(GlobalServerComponent vgConnection, CustomerQuery customerQuery, PostageCalculationParameters postageCalculationParameters) { _vgConnection = vgConnection; _customerQuery = customerQuery; _postageCalculationParameters = postageCalculationParameters; }
public ArticleManager(GlobalServerComponent vgConnection) { _vgConnection = vgConnection; _articleComponent = _vgConnection.GetBusinessComponent(GLOBAL_Components.BC_Article); }
public InvoiceQuery(GlobalServerComponent vgConnection) { _vgConnection = vgConnection; }
public InvoiceManager(GlobalServerComponent vgConnection) { _invoiceComp = vgConnection.GetBusinessComponent(GLOBAL_Components.BC_CustomerOrderCopy); _colInvoiceNo = _invoiceComp.bcGetTableObjectName((int)CustomerOrderCopy_Properties.COP_InvoiceNo); }
static VgConnections() { SourceConnection = new GlobalServerComponent(); DestinationConnection = new GlobalServerComponent(); }
public CustomerQuery(GlobalServerComponent vgConnection) { _vgConnection = vgConnection; _customerComponent = _vgConnection.GetBusinessComponent(GLOBAL_Components.BC_Customer); _colCustomerNo = _customerComponent.bcGetTableObjectName((int)Customer_Properties.CUS_CustomerNo); }
private static string GetNameOfClient(GlobalServerComponent connection) { string name; int connectionNo; connection.bcGetDataConnectionInfo(out connectionNo, out name); return name; }