public ActionResult Index() { string message = "Initial entering"; string className = this.GetType().Name; var result = _loggerCreator.FactoryMethod(); result.LoggMessage(className, message); return(View()); }
public async Task <IActionResult> AddGuide(NewGuideForm addGuide) { if (ModelState.IsValid) { var result = await _guideService.SaveNewGuideModel(addGuide); if (result == null) { string message = "Save of new guide form"; var logger = _loggerCreator.FactoryMethod(); logger.LoggMessage(this.GetType().Name, message); return(RedirectToAction("GuideNavigation", "Guide")); } else { ModelState.AddModelError("Login", "Login is already exist"); } } return(View(addGuide)); }
public async Task <IActionResult> AddTour(NewTourForm addTour) { await _tourService.SaveNewTour(addTour); string message = "Add of new Tour"; var logger = _loggerCreator.FactoryMethod(); logger.LoggMessage(this.GetType().Name, message); return(RedirectToAction("AllToursForGuide", "Guide")); }
public async Task <ActionResult> AddTouristFormStep1(NewTouristForm model) { await _touristServ.ProcessNewTouristModel(model); string message = "Upload new tourist form to submition"; var logger = _loggerCreator.FactoryMethod(); logger.LoggMessage(this.GetType().Name, message); if (ModelState.IsValid) { return(RedirectToAction("AddTouristFormStep2", model)); } return(View(model)); }