Beispiel #1
0
        public List <JournalEntries_Lines> 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_Lines");
            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_Lines> Res = new List <JournalEntries_Lines>();

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

            return(Res);
        }
Beispiel #2
0
 internal JournalEntries_Lines_Command(string ConnectionStr, JournalEntries_Lines obj_JournalEntries_Lines)
 {
     this._JournalEntries_Lines = obj_JournalEntries_Lines;
     this._DBHelper             = new DBHelper(ConnectionStr, null);
 }
Beispiel #3
0
 internal JournalEntries_Lines_Command(JournalEntries_Lines obj_JournalEntries_Lines)
 {
     this._JournalEntries_Lines = obj_JournalEntries_Lines;
     this._DBHelper             = new DBHelper();
 }