Beispiel #1
0
 public SBSupplier(int supplier_id = 0) : base()
 {
     this.suppliers_table = new SBTableSuppliers();
     if (supplier_id > 0)
     {
         this.GetDbData(supplier_id);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Get all available warehouse suppliers and return them as SBSupplier object
        /// </summary>
        /// <returns>
        /// A <see cref="ArrayList"/>
        /// </returns>
        public static ArrayList getSuppliers()
        {
            SBTableSuppliers ts   = new SBTableSuppliers();
            ArrayList        rows = ts.getRows("");

            if (rows == null)
            {
                return(null);
            }
            ArrayList suppliers = new ArrayList();

            foreach (Hashtable row in rows)
            {
                SBSupplier supplier = new SBSupplier();
                supplier.getData(Convert.ToInt32(row["supplier_id"]));
                suppliers.Add(supplier);
            }
            return(suppliers);
        }