Ejemplo n.º 1
0
        public ActionResult GetData()
        {
            dynamic listVehicles = 0;

            try
            {
                if (ModelState.IsValid)
                {
                    AuctionServiceClient service = new AuctionServiceClient();

                    listVehicles = service.GetAuctionListVehicles();


                    //var jsonData = new
                    //{
                    //    total = 1,
                    //    page = 1,
                    //    // records = dc.Vehicles.ToList().Count,
                    //    rows = test
                    //};
                }
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("error", "Something Wrong");
                listVehicles = null;
                throw ex;
            }
            return(Json(listVehicles, JsonRequestBehavior.AllowGet));
            //return Json(null, JsonRequestBehavior.AllowGet);
            // return Json(listVehicles, JsonRequestBehavior.AllowGet);
        }