Ejemplo n.º 1
0
        public List <InterfaceLog> 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("InterfaceLog");
            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 <InterfaceLog> Res = new List <InterfaceLog>();

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

            return(Res);
        }
Ejemplo n.º 2
0
 internal InterfaceLog_Command(string ConnectionStr, InterfaceLog obj_InterfaceLog)
 {
     this._InterfaceLog = obj_InterfaceLog;
     this._DBHelper     = new DBHelper(ConnectionStr, null);
 }
Ejemplo n.º 3
0
 internal InterfaceLog_Command(InterfaceLog obj_InterfaceLog)
 {
     this._InterfaceLog = obj_InterfaceLog;
     this._DBHelper     = new DBHelper();
 }