public UpdateTourCMSResponse Update(UpdateTourCMSRequest request)
        {
            UpdateTourCMSResponse response = new UpdateTourCMSResponse();

            if (request != null && request.ViewModel != null)
            {
                var domain = Mapper.Map <ApplicationTourViewModel, ApplicationTourDetails>(request.ViewModel);
                applicationTourRepo.Update(domain);
                unitOfWork.Commit();
            }
            return(response);
        }
예제 #2
0
        public JsonResult UpdateTourCMS(string viewModel)
        {
            ApplicationTourViewModel applicationTourViewModel = JsonConvert.DeserializeObject <ApplicationTourViewModel>(viewModel);
            UpdateTourCMSResponse    response = new UpdateTourCMSResponse();

            if (applicationTourViewModel != null)
            {
                response = applicationTourService.Update(new UpdateTourCMSRequest()
                {
                    ViewModel = applicationTourViewModel
                });
            }
            return(Json(new { success = true, response = response }, JsonRequestBehavior.AllowGet));
        }