public ActionResult Edit(Roomtype roomtype) { try { Roomtype roomtypeProxy = _hotelReservationService.GetRoomTypeById(roomtype.Id); roomtypeProxy.Name = roomtype.Name; roomtypeProxy.Description = roomtype.Description; roomtypeProxy.Ratepernight = roomtype.Ratepernight; _hotelReservationService.UpdateRoomType(roomtypeProxy); ViewBag.SuccessMessage = "Updated Successfully"; } catch (Exception) { ViewBag.ErrorMessage = "Upgradation Failed"; } return(View(roomtype)); }