Beispiel #1
0
        public ActionResult Edit(Guid id)
        {
            var mapping = rateRepository.GetRoomTypeRateTypeMappingId(id);

            RoomTypeRateTypeMappingVM model = new RoomTypeRateTypeMappingVM();

            if (mapping != null && mapping.Count > 0)
            {
                model = mapping[0];

                var roomTypeList = new SelectList(roomTypeRepository.GetRoomType(string.Empty), "Id", "RoomTypeCode");
                var ratetypeList = new SelectList(rateTypeRepository.GetRateType(string.Empty), "ID", "RateTypeCode");

                ViewBag.RoomTypeList = roomTypeList;
                ViewBag.RateTypeList = ratetypeList;

                return(View(model));
            }

            return(RedirectToAction("List"));
        }