public ActionResult Create()
        {
            var viewModel = new HotelPhotoCategories
            {
                HotelNameList = _InfoRepo.HotelInfoList(),
            };

            return(View(viewModel));
        }
        public ActionResult Create()
        {
            var viewModel = new HotelCityInfoAssociation
            {
                HotelNameList     = _HotelInfoRepo.HotelInfoList(),
                HotelCityInfoList = _CityInfoRepo.HotelCityInfoList(),
            };

            return(View(viewModel));
        }
예제 #3
0
        public ActionResult UploadPhoto()
        {
            try
            {
                var viewModel = new HotelPhotos
                {
                    HotelNameList     = _HotelInfoRepo.HotelInfoList(),
                    PhotoCategoryList = _PhotoCatRepo.HotelPhotoCategoryList(),

                    //formActionName = "UploadPhoto",
                    //formControllerName = "HotelPhoto",
                    //formOnSubmitAction = "return SaveConfirm(this,\'C\')",
                    //formSubmitBttnName = "Upload"
                };
                return(View(viewModel));
            }
            catch (Exception ex)
            {
                var viewModel = new HotelPhotos
                {
                    HotelPhotosList   = _PhotoRepo.HotelPhotoList(0, 0),
                    HotelNameList     = _HotelInfoRepo.HotelInfoList(),
                    PhotoCategoryList = _PhotoCatRepo.HotelPhotoCategoryList(),

                    //formActionName = "Edit",
                    //formControllerName = "HotelPhoto",
                    //formOnSubmitAction = "return SaveConfirm(this,\'C\')",
                    //formSubmitBttnName = "Save Changes"
                };
                ViewData["success"] = ex.Message;
                return(View(viewModel));
            }
        }
예제 #4
0
 public ActionResult List()
 {
     return(View(_HotelInfoRepo.HotelInfoList()));
 }