public JsonResult LoadGoodsNos(string term) { //读取所有货物档案数据 string strErrText = string.Empty; DDSystem dd = new DDSystem(); List<Goods> listGoods = dd.LoadAllGoodsByGoodsNo(term, LoginAccountId, LoginStaffName, out strErrText); if (listGoods == null) { listGoods = new List<Goods>(); } var ret = ( from g in listGoods select new { g.GoodsNo, g.Name, g.SpecModel, g.GWeight, g.Grade, g.Packing, g.PieceWeight }).ToArray(); return Json(ret, JsonRequestBehavior.AllowGet); }