public ActionResult SearchEmpty() { wardService warService = new wardService(); IEnumerable <WardDTO> wards = warService.GetNotFull(); return(Json(wards)); }
public ActionResult SearchWards(string id) { wardService warService = new wardService(); WardDTO ward = warService.GetbyId(id); return(Json(ward)); }
public ActionResult LoadWards() { wardService warService = new wardService(); IEnumerable <WardDTO> wards = warService.GetALL(); return(Json(wards)); }
public ActionResult DisContributePatient(string patient_Id) { wardService warService = new wardService(); int k = warService.disContribute(patient_Id); if (k == -1) { return(Json("删除失败")); } else { return(Json("删除成功")); } }
public ActionResult DeleteWard(string id) { wardService warService = new wardService(); int k = warService.Delete(id); if (k == -1) { return(Json("删除失败")); } else { return(Json("删除成功")); } }
public ActionResult AddWard(string id, string dept, int capacity) { wardService warService = new wardService(); int k = warService.AddNew(id, dept, capacity); if (k == -1) { return(Json("添加失败,已经有相应编号的病房了")); } else if (k == 2) { return(Json("添加失败,不存在该部门")); } else { return(Json("添加成功")); } }