Пример #1
0
        public ActionResult PopupCityInfo(HotelCityInfos model)
        {
            var viewModel = new HotelCityInfos
            {
                HotelCountryList = _CountryRepo.HotelCountryList(),
                //formActionName = "PopupCityInfo",
                //formControllerName = "HotelInfo",
                //formOnSubmitAction = "return SaveConfirm(this,\'C\')",
                //formSubmitBttnName = "Save",
            };

            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }
            else
            {
                //Htl_HotelCityInfos obj = new Htl_HotelCityInfos();
                //obj.CityName = model.CityName;
                //obj.Details = model.Details;
                //obj.CountryId = model.CountryId;
                //obj.isActive = model.isActive;
                //obj.isDeleted = false;
                //obj.CreatedBy = App_Class.AppSession.LogUserID;
                //obj.CreatedDate = DateTime.Now;

                _CityInfoRepo.HotelCityInfoAdd(model);

                ViewData["success"] = "Record successfully added.";

                return(RedirectToAction("Create"));
            }
        }
Пример #2
0
        public ActionResult PopupCityInfo()
        {
            var viewModel = new HotelCityInfos
            {
                HotelCountryList = _CountryRepo.HotelCountryList(),

                //formActionName = "PopupCityInfo",
                //formControllerName = "HotelInfo",
                //formOnSubmitAction = "return SaveConfirm(this,\'C\')",
                //formSubmitBttnName = "Save",
            };

            return(View(viewModel));
        }
Пример #3
0
        public void HotelCityInfoAdd(HotelCityInfos model)
        {
            Htl_HotelCityInfos obj = new Htl_HotelCityInfos
            {
                CityName    = model.CityName,
                Details     = model.Details,
                CountryId   = model.CountryId,
                isActive    = model.isActive,
                isDeleted   = false,
                CreatedBy   = App_Class.AppSession.LogUserID,
                CreatedDate = DateTime.Now,
            };

            entitity.AddToHtl_HotelCityInfos(obj);
            entitity.SaveChanges();
        }