public ActionResult querychildbom(string key) { var all = bomService.GetBomMaterial(); if (key != null && key != "") { key = key.ToLower(); var r = all.Where(p => (p.bomName.ToLower().Contains(key) || p.remark.ToLower().Contains(key) || p.version.Contains(key)) && p.isChild == true && p.parent_Id.HasValue == false && p.status == 1) .Select(x => new { id = x.bomId, name = x.bomName, version = x.version, remark = x.remark }).ToList(); return(Json(r, JsonRequestBehavior.AllowGet)); } // var r = all.Select(x => new { value = x.text.Replace(Masterpage.CurrUser.client_code + "-", ""), key = x.text.Replace(Masterpage.CurrUser.client_code + "-", "") }); return(Json("", JsonRequestBehavior.AllowGet)); }