コード例 #1
0
        public static long AddCategory(Hashtable row)
        {
            SBTableProductCategories ct = new SBTableProductCategories();

            ct.insertRow(row);
            return(ct.LastInsertID);
        }
コード例 #2
0
        /// <summary>
        /// Gets the categories.
        /// The method return an array list of SBProductCategory objects
        /// </summary>
        /// <returns>
        /// The categories., <see cref="SBProductCategory" />
        /// </returns>
        public static ArrayList getCategories(int store_id = 0)
        {
            var tc   = new SBTableProductCategories();
            var rows = tc.getRows("parent = 0");

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

            foreach (Hashtable row in rows)
            {
                SBProductCategory cat = new SBProductCategory();
                cat.SetDbData(row);
                cats.Add(cat);
            }
            return(cats);
        }
コード例 #3
0
 public SBProductCategory() : base()
 {
     this.db_table = new SBTableProductCategories();
     this.Data.Add("childs", new ArrayList());
 }