32 lines
973 B
C#
32 lines
973 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Interop.QBFC13;
|
|
using Interop.QBXMLRP2;
|
|
|
|
namespace BodyshopPartner.Utils
|
|
{
|
|
public static class QuickBooksInterop
|
|
{
|
|
private static string ticket;
|
|
private static RequestProcessor2 rp;
|
|
private static string maxVersion;
|
|
private static string companyFile = "";
|
|
private static QBFileMode mode = QBFileMode.qbFileOpenDoNotCare;
|
|
private static string appID = "IDN123";
|
|
private static string appName = "BodyshopPartner";
|
|
|
|
public static void connectToQuickBooks()
|
|
{
|
|
|
|
rp = new RequestProcessor2Class();
|
|
rp.OpenConnection(appID, appName);
|
|
ticket = rp.BeginSession(companyFile, mode);
|
|
string[] versions = rp.get_QBXMLVersionsForSession(ticket);
|
|
maxVersion = versions[versions.Length - 1];
|
|
}
|
|
}
|
|
}
|