Exemplo n.º 1
0
        public List <JournalEntries> SelectAll(int start, int length, List <WhereClause> Where, List <OrderByClause> OrderBy)
        {
            SelectQueryBuilder Sqb = new SelectQueryBuilder();

            Sqb.SelectAllColumns();
            if (start > 0 || length > 0)
            {
                if (start == 0)
                {
                    Sqb.TopRecords = length;
                }
                else
                {
                    Sqb.LimitRecords(start, length);
                }
            }
            Sqb.SelectFromTable("JournalEntries");
            if (Where != null)
            {
                foreach (WhereClause Item in Where)
                {
                    Sqb.AddWhere(Item);
                }
            }
            if (OrderBy != null)
            {
                foreach (OrderByClause Item in OrderBy)
                {
                    Sqb.AddOrderBy(Item);
                }
            }

            DataTable             dt  = LoadByQueryBuilder(Sqb);
            List <JournalEntries> Res = new List <JournalEntries>();

            foreach (DataRow Dr in dt.Rows)
            {
                JournalEntries Item = new JournalEntries();
                Item.ExecCommand.Load(Dr);
                Res.Add(Item);
            }

            return(Res);
        }
Exemplo n.º 2
0
 internal JournalEntries_Command(string ConnectionStr, JournalEntries obj_JournalEntries)
 {
     this._JournalEntries = obj_JournalEntries;
     this._DBHelper       = new DBHelper(ConnectionStr, null);
 }
Exemplo n.º 3
0
 internal JournalEntries_Command(JournalEntries obj_JournalEntries)
 {
     this._JournalEntries = obj_JournalEntries;
     this._DBHelper       = new DBHelper();
 }