示例#1
0
        public override void SetParam(DataTypeBase paramData)
        {
            switch (paramData.Type())
            {
            case DataType.UserNo:
                userNo = (TypeUserNo)paramData;
                break;

            case DataType.UserAggregate:
                user = (TypeUserAggregate)paramData;
                break;

            default:
                break;
            }
        }
示例#2
0
        public override void Run()
        {
            Console.WriteLine("ServiceSearchUser Run");
            DataAccessInterface dataAccess = new DBTableAccess();
            AggregateUser       aggregate  = (AggregateUser)dataAccess.Search(DataAccessInterface.SearchPattern.Users, param);

            Console.WriteLine("this is size of Run method in Service class: " + aggregate.Size());
            //IteratorUser iu = (IteratorUser)aggregate.Iterator();
            //while (iu.HasNext())
            //{
            //    DataListUser dlu = (DataListUser)iu.Next();
            //    Console.WriteLine("this is Iterator in Run Method: " + dlu.UserName());
            //}
            TypeUserAggregate userInfo = new TypeUserAggregate(aggregate);

            param.SetParam(userInfo);
        }