// Max per page is 100 public int CommitJournalEntries( string sDescription, List<QBJournalEntryLine> jelEntries ) { int iReturn = 0; switch (getActiveConnection().DataSource) { case "QBO": { QBOHelper qbo = new QBOHelper(); iReturn = qbo.CommitJournalEntries(sDescription, jelEntries); break; } case "QBD": { QBDHelper qbd = new QBDHelper(); iReturn = qbd.CommitJournalEntries(sDescription, jelEntries); break; } default: break; } return iReturn; }
// ---------------------- Start unified routines ---------------------- public List<QBAccount> getAllAccounts() // Max per page is 100 { var acctList = new List<QBAccount>(); switch (getActiveConnection().DataSource) { case "QBO": { QBOHelper qbo = new QBOHelper(); var accts = qbo.ListAllAccounts(); foreach (var item in accts) { var newAcct = new QBAccount(); newAcct.ID = item.Id.Value; newAcct.Name = item.Name; acctList.Add(newAcct); } break; } case "QBD": { QBDHelper qbd = new QBDHelper(); var accts = qbd.ListAllAccounts(); foreach (var item in accts) { var newAcct = new QBAccount(); newAcct.ID = item.Id.Value; newAcct.Name = item.Name; acctList.Add(newAcct); } break; } default: break; } return acctList; }
// ---------------------- Start unified routines ---------------------- public List <QBAccount> getAllAccounts() // Max per page is 100 { var acctList = new List <QBAccount>(); switch (getActiveConnection().DataSource) { case "QBO": { QBOHelper qbo = new QBOHelper(); var accts = qbo.ListAllAccounts(); foreach (var item in accts) { var newAcct = new QBAccount(); newAcct.ID = item.Id.Value; newAcct.Name = item.Name; acctList.Add(newAcct); } break; } case "QBD": { QBDHelper qbd = new QBDHelper(); var accts = qbd.ListAllAccounts(); foreach (var item in accts) { var newAcct = new QBAccount(); newAcct.ID = item.Id.Value; newAcct.Name = item.Name; acctList.Add(newAcct); } break; } default: break; } return(acctList); }