예제 #1
0
        public override void SetParam(DataTypeBase paramData)
        {
            switch (paramData.Type())
            {
            case DataType.BookNo:
                bookNo = (TypeBookNo)paramData;
                break;

            case DataType.BookName:
                bookName = (TypeBookName)paramData;
                break;

            case DataType.BookAggregate:
                bookInfo = (TypeBookAggregate)paramData;
                break;

            case DataType.RentalState:
                rentalState = (TypeRentalState)paramData;
                break;

            case DataType.CategoryNo:
                categoryNo = (TypeCategoryNo)paramData;
                break;

            default:
                break;
            }
        }
예제 #2
0
        private void SearchData()
        {
            Console.WriteLine("ServiceBooksSearch Run");
            //検索実行
            DataAccessInterface dataAccess = new DBTableAccess();
            AggregateBook       aggregate  = (AggregateBook)dataAccess.Search(DataAccessInterface.SearchPattern.BooksAllInfo, param);

            //取得データを格納
            TypeBookAggregate bookInfo = new TypeBookAggregate(aggregate);

            param.SetParam(bookInfo);
        }