public override void LoadSetting(string fieldName, string fieldValue) { base.LoadSetting(fieldName, fieldValue); switch (fieldName.ToLower()) { case "applicationid": ApplicationID = fieldValue; break; case "applicationname": ApplicationName = fieldValue; break; case "quickbookfilename": QuickbookFileName = fieldValue; break; case "itemtype": ItemType = (QuickbooksItemType)Enum.Parse(typeof(QuickbooksItemType), fieldValue); break; } }
public static string GetAllItems(QuickbooksItemType itemType = QuickbooksItemType.Item) { string strItemType = ""; switch (itemType) { case QuickbooksItemType.Item: strItemType = "ItemQueryRq"; break; case QuickbooksItemType.Invoice: strItemType = "InvoiceQueryRq"; break; case QuickbooksItemType.Company: strItemType = "CompanyQueryRq"; break; } if (!String.IsNullOrWhiteSpace(strItemType)) { return(GetQBXMLDocument(strItemType, "requestID=1").OuterXml); } return(String.Empty); }