public JsonResult LoadCarrierCars(string carrierName) { string strErrText; DDSystem dd = new DDSystem(); List <CarrierCar> listCar = dd.LoadCarrierCars(carrierName, LoginAccountId, LoginStaffName, out strErrText); if (listCar == null) { throw new Exception(strErrText); } var ret = from c in listCar select new { c.CarNo, c.TrailerNo, c.CarryingCapacity }; return(Json(ret, JsonRequestBehavior.AllowGet)); }