Пример #1
0
        public SingleResponse UpdateRoomOfHotel(RoomOfHotelReq req)
        {
            //Khởi tạo
            var         result = new SingleResponse();
            RoomOfHotel roh    = new RoomOfHotel();

            //Gán
            roh.RoomOfHotelID     = req.RoomOfHotelID;
            roh.RoomName          = req.RoomName;
            roh.RoomAmount        = req.RoomAmount;
            roh.BedAmount         = req.BedAmount;
            roh.PeopleAmount      = req.PeopleAmount;
            roh.PolicyApply       = req.PolicyApply;
            roh.PolicyNotApply    = req.PolicyNotApply;
            roh.RoomPriceForNight = req.RoomPriceForNight;
            roh.Discount          = req.Discount;
            roh.Image             = req.Image;
            roh.RoomsCreatedDate  = req.RoomsCreatedDate;
            roh.RoomOfHotelNote   = req.RoomOfHotelNote;
            roh.HotelID           = req.HotelID;
            //Trả về
            result      = base.Update(roh); //base gọi lớp cha
            result.Data = roh;
            return(result);
        }
Пример #2
0
        public IActionResult UpdateRoomOfHotel([FromBody] RoomOfHotelReq req)
        {
            var result = _svc.UpdateRoomOfHotel(req);

            return(Ok(result));
        }