public ActionResult ReportDevice(string id, string info) { deviceService devService = new deviceService(); string result = devService.Report(id, info); return(Json(result)); }
public ActionResult ContributeDevice(string id, string dept) { deviceService devService = new deviceService(); string result = devService.Contribute(id, dept); return(Json(result)); }
public ActionResult SearchDevice(string id) { deviceService devService = new deviceService(); DeviceDTO device = devService.GetById(id); return(Json(device)); }
public ActionResult DeleteDevice(string id) { deviceService devService = new deviceService(); string result = devService.Delete(id); return(Json(result)); }
public ActionResult LoadDevices() { deviceService devService = new deviceService(); IEnumerable <DeviceDTO> devices = devService.GetALL(); return(Json(devices)); }
public ActionResult AddDevice(string id, string name) { deviceService devService = new deviceService(); int k = devService.AddNew(id, name); if (k == -1) { return(Json("添加失败,已经有相应编号的设备了")); } else { return(Json("添加成功")); } }