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

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

            return(Res);
        }
Exemplo n.º 2
0
 internal Payments_Checks_Command(string ConnectionStr, Payments_Checks obj_Payments_Checks)
 {
     this._Payments_Checks = obj_Payments_Checks;
     this._DBHelper        = new DBHelper(ConnectionStr, null);
 }
Exemplo n.º 3
0
 internal Payments_Checks_Command(Payments_Checks obj_Payments_Checks)
 {
     this._Payments_Checks = obj_Payments_Checks;
     this._DBHelper        = new DBHelper();
 }