Ejemplo n.º 1
0
        public JsonResult LoadCarrierNames(string term)
        {
            //读取所有承运单位数据
            string strErrText = string.Empty;
            DDSystem dd = new DDSystem();
            List<Carrier> listCarrier = dd.LoadCarriers(LoginAccountId, LoginStaffName, out strErrText);
            if (listCarrier == null)
            {
                listCarrier = new List<Carrier>();
            }

            //提取承运单位名称中包含关键字的记录
            var ret = (
                from r in listCarrier
                where r.Name.Contains(term)
                select r.Name).ToArray();

            return Json(ret, JsonRequestBehavior.AllowGet);
        }