public List <Payments_Invoices> 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_Invoices"); 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_Invoices> Res = new List <Payments_Invoices>(); foreach (DataRow Dr in dt.Rows) { Payments_Invoices Item = new Payments_Invoices(); Item.ExecCommand.Load(Dr); Res.Add(Item); } return(Res); }
internal Payments_Invoices_Command(string ConnectionStr, Payments_Invoices obj_Payments_Invoices) { this._Payments_Invoices = obj_Payments_Invoices; this._DBHelper = new DBHelper(ConnectionStr, null); }
internal Payments_Invoices_Command(Payments_Invoices obj_Payments_Invoices) { this._Payments_Invoices = obj_Payments_Invoices; this._DBHelper = new DBHelper(); }