public IActionResult Index(Journey journey) { var emailObj = TempDataHelper.Get(Statics.EmailTempData); TempDataHelper.Remove(Statics.EmailTempData); string password = journey.Password; journey = _wrapper.GetJourney(emailObj); journey.Password = password; journey.CurrentPage = "About You"; if (!journey.Registered) { var user = new User(journey.Email, 0, DateTime.Now, DateTime.Now, Guid.NewGuid()) { PrimaryEmail = journey.Email, CurrentPassword = journey.Password }; _wrapper.RegisterUser(user); journey.Registered = true; _wrapper.PutJourney(journey); } return(View(journey)); }
// GET public IActionResult Index(Journey journey) { var email = Request.Query["email"]; if (email.Count != 0) { journey = _wrapper.GetJourney(email[0]); TempDataHelper.Set(Statics.EmailTempData, email); } else { string emailObj = TempDataHelper.Get(Statics.EmailTempData); if (emailObj != null) { journey = _wrapper.GetJourney(emailObj); } else { journey = new Journey(); } } journey.CurrentPage = "Welcome"; return(View(journey)); }
public IActionResult SaveData() { var currentVm = TempDataHelper.Get <LightFeedbackVm>(TempData, _feedbackTempDataKey); _lightFeedbackService.SaveFeedBack(currentVm); return(PartialView("Complete")); }
private LightFeedbackVm UpdateTempData(LightFeedbackVm lightingSurveyVm, bool displaySameView) { var currentVm = TempDataHelper.Get <LightFeedbackVm>(TempData, _feedbackTempDataKey); var updatedTempData = _tempDataService.UpdateTempData(currentVm, lightingSurveyVm, displaySameView); TempDataHelper.Put <LightFeedbackVm>(TempData, _feedbackTempDataKey, updatedTempData); return(updatedTempData); }
public IActionResult GetViewById(int viewId) { var feedbackTempData = TempDataHelper.Get <LightFeedbackVm>(TempData, _feedbackTempDataKey); var viewToDisplay = _lightFeedbackService.GetFeedbackQuestion(viewId); feedbackTempData.CurrentStep = viewId; TempDataHelper.Put <LightFeedbackVm>(TempData, _feedbackTempDataKey, feedbackTempData); return(PartialView(viewToDisplay, feedbackTempData)); }
public IActionResult Create() { StatusQuery Notification; Notification = TempDataHelper.Get <StatusQuery>(TempData, "Notification"); if (Notification != null) { ViewBag.Status = Notification.Status; ViewBag.Value = Notification.Value; ViewBag.Type = Notification.Type; } return(View()); }
public IActionResult Index() { StatusQuery Notification; var _listranfer = _pricetranfer.GetAll(); Notification = TempDataHelper.Get <StatusQuery>(TempData, "Notification"); if (Notification != null) { ViewBag.Status = Notification.Status; ViewBag.Value = Notification.Value; ViewBag.Type = Notification.Type; } return(View(_listranfer)); }
public IActionResult Index() { var lightFeedbackVm = TempDataHelper.Get <LightFeedbackVm>(TempData, _feedbackTempDataKey); if (lightFeedbackVm == null) { lightFeedbackVm = _tempDataService.InitialiseViewModel(); } else { lightFeedbackVm.CurrentStep = 1; } TempDataHelper.Put <LightFeedbackVm>(TempData, _feedbackTempDataKey, lightFeedbackVm); return(View(lightFeedbackVm)); }
public IActionResult Index() { StatusQuery Notification; Notification = TempDataHelper.Get <StatusQuery>(TempData, "Notification"); if (Notification != null) { ViewBag.Status = Notification.Status; ViewBag.Value = Notification.Value; ViewBag.Type = Notification.Type; } var _listInfor = _formation.GetAll(); List <InformationModel> ListInformationTypeModel = new List <InformationModel>(); foreach (var item in _listInfor) { if (item.Status) { var informmodel = new InformationModel() { Descreption = "Huyền thoại bóng đá", Name = item.Name, Id = item.Id, Number = item.Number, Club = item.Club, Status = item.Status, Image = item.Image }; ListInformationTypeModel.Add(informmodel); } else { var informmodel = new InformationModel() { Descreption = "Siêu sao bóng đá", Name = item.Name, Id = item.Id, Number = item.Number, Club = item.Club, Status = item.Status, Image = item.Image }; ListInformationTypeModel.Add(informmodel); } } return(View(ListInformationTypeModel)); }
// GET public IActionResult Index(Journey journey) { var emailObj = TempDataHelper.Get(Statics.EmailTempData); if (!string.IsNullOrEmpty(emailObj)) { journey = _wrapper.GetJourney(emailObj); } else { journey = new Journey(); } journey.CurrentPage = "Register"; return(View(journey)); }
// GET public IActionResult Index(Journey journey) { var emailObj = TempDataHelper.Get(Statics.EmailTempData); if (!string.IsNullOrEmpty(emailObj)) { journey = _wrapper.GetJourney(emailObj); journey.CurrentPage = "Login"; if (!journey.Registered) { return(RedirectToAction("Index", "NavigateRegister")); } _wrapper.PutJourney(journey); return(View(journey)); } return(View(journey)); }