public async Task <IActionResult> Edit(long id, [Bind("Id,Label,Code")] Guichet guichet) { if (id != guichet.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(guichet); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GuichetExists(guichet.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(guichet)); }
public async Task <IActionResult> Create([Bind("Id,Label,Code")] Guichet guichet) { if (ModelState.IsValid) { _context.Add(guichet); await _context.SaveChangesAsync(); //var step = Convert.ToInt32(HttpContext.Session.Get<string>("StepIdentifier") + 1); //HttpContext.Session.Set<string>("StepIdentifier", step.ToString()); return(LoadNextStep(HttpContext.Session.Get <List <SchemeStepFlowModel> >("WorkFlow"), Convert.ToInt32(HttpContext.Session.Get <string>("StepIdentifier")))); } return(View(guichet)); }