Esempio n. 1
0
        public ActionResult GenerateAuctionListPDF(int auctionFrntID)
        {
            //List<Vehicles> vehicles = new List<Vehicles>();

            dynamic vehicles = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    AuctionServiceClient service = new AuctionServiceClient();
                    vehicles = service.GetVehiclesForPDF(auctionFrntID);
                }
            }
            // Please through Exeption Everywhere
            catch (Exception e)
            {
                ModelState.AddModelError("error", "Something Wrong");
                vehicles = null;
                throw e;
            }
            return(Json(vehicles, JsonRequestBehavior.AllowGet));
        }