Ejemplo n.º 1
0
        // 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;
        }
Ejemplo n.º 2
0
		// ---------------------- 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;
		}
Ejemplo n.º 3
0
        // ---------------------- 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);
        }