protected override IList <TermsOfPayment> _FindAllCollection()
        {
            List <TermsOfPayment> _grp = new List <TermsOfPayment>();

            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("TermsOfPayment");

            DbCommand    _cmd    = CreateDbCommand(clause);
            DbDataReader _reader = _cmd.ExecuteReader();

            while (_reader.Read())
            {
                TermsOfPayment _obj = CreateDbEntity();
                LoadFromReader(_obj, _reader);

                _grp.Add(_obj);
            }

            _reader.Close();
            _cmd.Dispose();

            return(_grp);
        }
        public DataTable Table()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectColumn("RecurringGeneralJournals", "RecurringGeneralJournalNumber", "RecurringGeneralJournalNumber")
            .From("RecurringGeneralJournals");


            DataTable table = new DataTable();

            table.Columns.Add("RecurringGeneralJournalNumber");

            DbCommand    _cmd    = CreateDbCommand(GetQuery_SelectAll());
            DbDataReader _reader = _cmd.ExecuteReader();

            while (_reader.Read())
            {
                DataRow row = table.NewRow();
                row["RecurringGeneralJournalNumber"] = GetInt32(_reader, "RecurringGeneralJournalNumber");
                table.Rows.Add(row);
            }
            _reader.Close();
            _cmd.Dispose();

            return(table);
        }
Example #3
0
        /// <inheritdoc/>
        protected sealed override async Task <InsertScalarResult> InsertScalarAsync(DbSelectStatement statement, bool outputIdentity, CancellationToken ct)
        {
            var command  = GetInsertScalarCommand(statement);
            var rowCount = await ExecuteNonQueryAsync(command, ct);

            return(rowCount > 0 ? new InsertScalarResult(true, command.LastInsertedId) : default(InsertScalarResult));
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll().From("SupplierDiscountLines");
            return(clause);
        }
Example #5
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll().From("CustomerDeposits");
            return(clause);
        }
        private DbSelectStatement GetQuery_SelectCountByCompanyName(string companyName)
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectCount().From("DataFileInformation").Criteria.IsEqual("DataFileInformation", "CompanyName", companyName);
            return(clause);
        }
Example #7
0
        protected IList <SaleLine> _FindCollectionBySaleID(int?SaleID)
        {
            BindingList <SaleLine> _grp = new BindingList <SaleLine>();

            if (SaleID == null)
            {
                return(_grp);
            }

            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("SaleLines")
            .Criteria
            .IsEqual("SaleLines", "SaleID", SaleID.Value);



            DbCommand    _cmd    = CreateDbCommand(clause);
            DbDataReader _reader = _cmd.ExecuteReader();

            while (_reader.Read())
            {
                SaleLine _obj = CreateDbEntity();
                LoadFromReader(_obj, _reader);
                _grp.Add(_obj);
            }
            _reader.Close();
            _cmd.Dispose();

            return(_grp);
        }
Example #8
0
        public List <ItemPurchasesHistory> List(int?ItemID, int?year_from, int?year_to)
        {
            List <ItemPurchasesHistory> _grp = new List <ItemPurchasesHistory>();

            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll()
            .From("ItemPurchasesHistory")
            .Criteria
            .IsEqual("ItemPurchasesHistory", "ItemID", ItemID)
            .IsGreaterEqual("ItemPurchasesHistory", "FinancialYear", year_from)
            .IsLessEqual("ItemPurchasesHistory", "FinancialYear", year_to)
            ;

            DbCommand    _cmd    = CreateDbCommand(clause);
            DbDataReader _reader = _cmd.ExecuteReader();

            while (_reader.Read())
            {
                ItemPurchasesHistory _obj = CreateDbEntity();
                LoadFromReader(_obj, _reader);
                _grp.Add(_obj);
            }

            _reader.Close();
            _cmd.Dispose();

            return(_grp);
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll().From("LinkedCategories");

            return(clause);
        }
Example #10
0
 internal virtual void Initialize(DbSelectStatement query)
 {
     _subQueryEliminator = query.SubQueryEliminator;
     FromClause          = query.From;
     _sourceModels       = _sourceModels.Add(FromClause);
     WhereExpression     = query.Where;
     OrderByList         = query.OrderBy;
 }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll()
            .From("RecurringGeneralJournalLines");
            return(clause);
        }
Example #12
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll().From("Superannuation");

            return(clause);
        }
Example #13
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll().From("SupplierFinanceCharges");

            return(clause);
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll().From("WageDollarHistory");

            return(clause);
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll()
            .From("SubAccountTypes");

            return(clause);
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("MoneyReceivedLines");
            return(clause);
        }
Example #17
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll()
            .From("JournalRecords");

            return(clause);
        }
        public DbSelectStatement GetQuery_SelectCount()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectCount()
            .From("Currency");
            return(clause);
        }
        private DbSelectStatement GetQuery_SelectByGeneralJournalLineID(int GeneralJournalLineID)
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll()
            .From("GeneralJournalLines")
            .Criteria.IsEqual("GeneralJournalLines", "GeneralJournalLineID", GeneralJournalLineID);
            return(clause);
        }
Example #20
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("OrderStatus");
            return(clause);
        }
Example #21
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectAll()
            .From("BillingRateUsed");

            return(clause);
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("TaxCodeConsolidations");
            return(clause);
        }
        private DbSelectStatement GetQuery_SelectCountByRecurringGeneralJournalLineID(int RecurringGeneralJournalLineID)
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectCount()
            .From("RecurringGeneralJournalLines")
            .Criteria.IsEqual("RecurringGeneralJournalLines", "RecurringGeneralJournalLineID", RecurringGeneralJournalLineID);
            return(clause);
        }
Example #24
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("CardActivities");
            return(clause);
        }
Example #25
0
        private DbSelectStatement GetQuery_SelectCountByGeneralJournalNumber(string GeneralJournalNumber)
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectCount()
            .From("GeneralJournals")
            .Criteria.IsEqual("GeneralJournals", "GeneralJournalNumber", GeneralJournalNumber);
            return(clause);
        }
Example #26
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("ShippingMethods");

            return(clause);
        }
        private DbSelectStatement GetQuery_SelectCountByJobBudgetID(int JobBudgetID)
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause.SelectCount()
            .From("JobBudgets")
            .Criteria
            .IsEqual("JobBudgets", "JobBudgetID", JobBudgetID);
            return(clause);
        }
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("RecurringPurchases");

            return(clause);
        }
        private DbSelectStatement GetQuery_SelectCountByCustomListID(int CustomListID)
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectCount()
            .From("CustomLists")
            .Criteria.IsEqual("CustomLists", "CustomListID", CustomListID);
            return(clause);
        }
Example #30
0
        private DbSelectStatement GetQuery_SelectAll()
        {
            DbSelectStatement clause = DbMgr.CreateSelectClause();

            clause
            .SelectAll()
            .From("TransferMoney");

            return(clause);
        }