Example #1
0
        public ActionResult SearchEmpty()
        {
            wardService           warService = new wardService();
            IEnumerable <WardDTO> wards      = warService.GetNotFull();

            return(Json(wards));
        }
Example #2
0
        public ActionResult SearchWards(string id)
        {
            wardService warService = new wardService();
            WardDTO     ward       = warService.GetbyId(id);

            return(Json(ward));
        }
Example #3
0
        public ActionResult LoadWards()
        {
            wardService           warService = new wardService();
            IEnumerable <WardDTO> wards      = warService.GetALL();

            return(Json(wards));
        }
Example #4
0
        public ActionResult DisContributePatient(string patient_Id)
        {
            wardService warService = new wardService();
            int         k          = warService.disContribute(patient_Id);

            if (k == -1)
            {
                return(Json("删除失败"));
            }
            else
            {
                return(Json("删除成功"));
            }
        }
Example #5
0
        public ActionResult DeleteWard(string id)
        {
            wardService warService = new wardService();
            int         k          = warService.Delete(id);

            if (k == -1)
            {
                return(Json("删除失败"));
            }
            else
            {
                return(Json("删除成功"));
            }
        }
Example #6
0
        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("添加成功"));
            }
        }