public ActionResult Vehicle()
        {
            TritonDataCalls _TritonData = new TritonDataCalls();
            var             VehicleList = _TritonData.ReadAllVehicleList().ToList();

            var vehicleL = VehicleList.Select(i => new { i.Id, i.Name, i.Type, i.Branch }).ToList();

            JsonResult json = Json(new { data = vehicleL });

            json.MaxJsonLength = int.MaxValue;

            return(json);
        }
Esempio n. 2
0
        public IEnumerable <Vehicle> GetAllVehicles()
        {
            List <Vehicle> veh = new List <Vehicle>();

            try
            {
                TritonDataCalls contourVoucher = new TritonDataCalls();

                veh = (List <Vehicle>)contourVoucher.ReadAllVehicleList();
            }
            catch (Exception ex)
            {
                //Log Errors
            }
            return(veh);
        }