Example #1
0
        public ActionResult querydepotmaterial(string key, int depotid)
        {
            var all = stockoutService.GetDepotMaterial(depotid, 1);

            if (key != null && key != "")
            {
                var r = all.Where(p => p.materialNo.Contains(key) || p.materialName.Contains(key) || p.tunumber.Contains(key) || p.materialModel.Contains(key))
                        .Select(x => new { code = x.materialNo, name = x.materialName, model = x.materialModel, tu = x.tunumber, mc = x.category }).ToList();
                return(Json(r, JsonRequestBehavior.AllowGet));
            }
            return(Json("", JsonRequestBehavior.AllowGet));
        }