public ActionResult Editor() { var data = new EditorModel() { Name = _name }; return View(data); }
public ActionResult Editor(EditorModel data, bool NewPage = false) { if (string.IsNullOrWhiteSpace(data.Name)) { // Push back an error ModelState.AddModelError("Name", "Name must be specified"); return View(data); } else { _name = data.Name; if (NewPage) { return RedirectToAction("ShowEditorValues"); } else { // Close the page return IntelliTect.Journey.Close(data.Refresh); } } }
public ActionResult ShowEditorValues(bool openPageAfterSubmit = false) { var data = new EditorModel() { Name = _name }; ViewBag.OpenPageAfterSubmit = openPageAfterSubmit; return View(data); }