Ejemplo n.º 1
0
        public JsonResult GetbyID(string machineID)
        {
            var obj = (machineDB.GetbyID(machineID));

            if (obj.lstMachine != null && obj.lstMachine.Count > 0)
            {
                return(Json((machineDB.GetbyID(machineID)).lstMachine[0], JsonRequestBehavior.AllowGet));
            }
            else
            {
                obj.lstMachine = new List <Machine>();
                return(Json(obj.lstMachine, JsonRequestBehavior.AllowGet));
            }
        }