示例#1
0
        public ActionResult Index()
        {
            HomeManager mgr = new HomeManager();

            HomeIndexVM model = new HomeIndexVM();

            var specialCourier  = mgr.GetAllSpecials();
            var featuredCourier = mgr.GetFeaturedVehicles();

            if (specialCourier.Success)
            {
                model.Specials = specialCourier.Package;
            }
            else
            {
                throw new Exception();
            }
            if (featuredCourier.Success)
            {
                model.FeaturedVehicles = featuredCourier.Package;
            }
            else
            {
                throw new Exception();
            }

            return(View(model));
        }
示例#2
0
        public ActionResult Specials()
        {
            HomeManager mgr = new HomeManager();

            var specialCourier = mgr.GetAllSpecials();

            List <Special> model = new List <Special>();

            if (specialCourier.Success)
            {
                model = specialCourier.Package;
            }
            else
            {
                throw new Exception();
            }

            return(View(model));
        }