示例#1
0
 public ActionResult Edit(RoomTypeDto roomTypeDto)
 {
     if (ModelState.IsValid)
     {
         _roomTypeService.Edit(roomTypeDto);
         return(RedirectToAction("getall", "RoomType"));
     }
     return(View(roomTypeDto));
 }
        public async Task <IActionResult> Edit(int id, RoomTypeEditInputModel roomTypeEditInputModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(roomTypeEditInputModel));
            }

            RoomTypeServiceModel roomTypeServiceModel = AutoMapper.Mapper.Map <RoomTypeServiceModel>(roomTypeEditInputModel);

            await roomTypeService.Edit(id, roomTypeServiceModel);

            return(Redirect("/Administration/RoomType/All"));
        }
示例#3
0
 public void Edit(RoomType entity)
 {
     _roomTypeService.Edit(entity);
 }