//20130706から追加 
        //カテゴリ検索
        protected AggregateBase SearchCategoryAll(ParamList param)
        {
            Console.WriteLine("this is SearchUser method of DBTableAccess");
            AggregateBase aggregate = null;

            String query = "select * from category";
            List <List <String> > dataList = new List <List <string> >();
            DataSet dataset = ((DBSqlServer)db).QuerySelect(query, "category");

            for (int i = 0; i < dataset.Tables["category"].Rows.Count; i++)
            {
                String        rowColumn0 = dataset.Tables["category"].Rows[i][0].ToString().Trim();
                String        rowColumn1 = dataset.Tables["category"].Rows[i][1].ToString().Trim();
                List <String> item       = new List <String>();
                item.Add(rowColumn0);
                item.Add(rowColumn1);
                dataList.Add(item);
            }
            for (int j = 0; j < dataList.Count; j++)
            {
                for (int k = 0; k < 2; k++)
                {
                    Console.Write("this is DBTableAccess: " + dataList[j][k].ToString() + "  ");
                    Console.WriteLine(dataList[j][k].ToString());
                }
            }
            aggregate = new AggregateCategory(dataList);
            return(aggregate);
        }
Exemple #2
0
        public override void Run()
        {
            DataAccessInterface dataAccess = new DBTableAccess();
            AggregateCategory   aggregate  = (AggregateCategory)dataAccess.Search(DataAccessInterface.SearchPattern.Categorys, param);

            TypeCategoryAggregate categoryInfo = new TypeCategoryAggregate(aggregate);

            param.SetParam(categoryInfo);
        }
 public IteratorCategory(AggregateCategory categoryInfo)
 {
     this.categoryInfo = categoryInfo;
 }