public IActionResult UpdateDetails() { int RoomIDDetail = 0; int RoomNumberDetail = 0; string RoomTypeDetail = ""; int RoomPriceDetail = 0; int RoomCapacityDetail = 0; string RoomStatusDetail = ""; bool RoomSmokingDetail = false; RoomIDDetail = Convert.ToInt32(Request.Form["RoomIDDetail"].ToString()); RoomNumberDetail = Convert.ToInt32(Request.Form["RoomNumberDetail"].ToString()); RoomTypeDetail = Request.Form["RoomTypeDetail"].ToString(); RoomPriceDetail = Convert.ToInt32(Request.Form["RoomPriceDetail"].ToString()); RoomCapacityDetail = Convert.ToInt32(Request.Form["RoomCapacityDetail"].ToString()); RoomStatusDetail = Request.Form["RoomStatusDetail"].ToString(); RoomSmokingDetail = Convert.ToBoolean(Request.Form["RoomSmokingDetail"].ToString()); if (roomFacade.UpdateRoom(RoomIDDetail, RoomTypeDetail, RoomPriceDetail, RoomCapacityDetail, RoomStatusDetail, RoomSmokingDetail)) { TempData["updateMessage"] = "Update Successful"; return(Redirect("ViewRoomSummary/GetRoomSummary/" + RoomIDDetail)); } TempData["updateMessage"] = "Update Unsuccessful"; return(Redirect("ViewRoomSummary/GetRoomSummary/UpdateRoom/" + RoomIDDetail)); }
public IHttpActionResult UpdateRoom([FromBody] RoomModel roomModel) { _roomFacade.UpdateRoom(Mapper.Map <RoomDto>(roomModel), UserId); return(Ok()); }