示例#1
0
        public ActionResult RoomEdit(房间信息DTO dto)
        {
            房间信息DTO model = new 房间信息DTO();

            if (dto.Id > 0)
            {
                model = _iRoomService.GetDTO(dto.Id);
            }

            return(View(model));
        }
示例#2
0
        public ActionResult RoomList(房间信息DTO dTO)
        {
            var 房间   = _iRoomService.List(dTO);
            var json = new
            {
                code  = 0,
                msg   = "",
                count = 0,
                data  = 房间.ToArray()
            };

            return(Json(json));
        }
示例#3
0
        public JsonResult RoomDelete(房间信息DTO dto)
        {
            var json = new
            {
                code  = 0,
                msg   = "删除成功",
                count = 0,
                data  = ""
            };

            if (dto.Id > 0)
            {
                _iRoomService.Del(dto);
            }

            return(Json(json));
        }
示例#4
0
        public ActionResult RoomSave(房间信息DTO dto)
        {
            var json = new
            {
                code  = 0,
                msg   = "保存成功",
                count = 0,
                data  = ""
            };

            //if
            //dto.
            //dto.ForEach(r => r.CompanyId = 1);
            //dto.ForEach(r => _iRoomService.Save(r));
            //dto.CompanyId = HotelUser.CompanyId;
            //dto.CompanyId = 1;//
            _iRoomService.Save(dto);
            return(Json(json));
        }