Added QB dependencies + simple http server.
This commit is contained in:
31
BodyshopUploader/Utils/QuickBooksInterop.cs
Normal file
31
BodyshopUploader/Utils/QuickBooksInterop.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user