public List <AP_Master_Supplier_Contact> 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("AP_Master_Supplier_Contact");
            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 <AP_Master_Supplier_Contact> Res = new List <AP_Master_Supplier_Contact>();

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

            return(Res);
        }
 internal AP_Master_Supplier_Contact_Command(string ConnectionStr, AP_Master_Supplier_Contact obj_AP_Master_Supplier_Contact)
 {
     this._AP_Master_Supplier_Contact = obj_AP_Master_Supplier_Contact;
     this._DBHelper = new DBHelper(ConnectionStr, null);
 }
 internal AP_Master_Supplier_Contact_Command(AP_Master_Supplier_Contact obj_AP_Master_Supplier_Contact)
 {
     this._AP_Master_Supplier_Contact = obj_AP_Master_Supplier_Contact;
     this._DBHelper = new DBHelper();
 }