//
        // GET: /Home/

        public ActionResult Index()
        {
            //call BL
            BikeSearchCommand _command = new BikeSearchCommand();
            BikeSearchResult  _result  = CommandInvoker.InvokeCommand <BikeSearchCommand, BikeSearchResult>(_command);

            //
            return(View(_result));
        }
Beispiel #2
0
        public ActionResult GetBikes(string SearchRegNumber, string SearchProducer, string SearchColour)
        {
            //call BL
            BikeSearchCommand _command = new BikeSearchCommand();

            _command.RegNumber = SearchRegNumber;
            _command.Producer  = SearchProducer;
            _command.Colour    = SearchColour;

            BikeSearchResult _result = CommandInvoker.InvokeCommand <BikeSearchCommand, BikeSearchResult>(_command);


            return(Json(_result.Result, JsonRequestBehavior.AllowGet));
        }
        //
        // GET: /Home/

        public ActionResult Index()
        {
            //call BL
            //BikeSearchCommand _command = new BikeSearchCommand();
            //BikeSearchResult _result = CommandInvoker.InvokeCommand<BikeSearchCommand, BikeSearchResult>(_command);
            //Console.WriteLine(_result.ToString());



            BikeSearchCommand command = new BikeSearchCommand();
            BikeSearchResult  _result = CommandInvoker.InvokeCommand <BikeSearchCommand, BikeSearchResult>(command);

            return(View(_result.Result));
        }
Beispiel #4
0
        // GET: Bikes
        public ActionResult Index(string SearchRegNumber, string SearchProducer, string SearchColour, int?id)
        {
            //call BL
            BikeSearchCommand _command = new BikeSearchCommand();

            _command.RegNumber = SearchRegNumber;
            _command.Producer  = SearchProducer;
            _command.Colour    = SearchColour;
            //_command.PageSize = 3;
            //_command.PageIndex = (id ?? 0);
            BikeSearchResult _result = CommandInvoker.InvokeCommand <BikeSearchCommand, BikeSearchResult>(_command);


            //ViewBag.HasNext = _result.HasNext;
            //ViewBag.HasPrevious = _result.HasPrevious;
            //ViewBag.PageIndex = _command.PageIndex;

            return(View(_result.Result));
        }