public ActionResult App(string id) { //If they didn't pass us an id, they need to enter one if (!id.HasValue()) { return(View("NoId")); } //we're allowing them to create a new application with their CmsStudentId var model = _interns.LoadByCode(id) ?? _interns.Create(id); //they can only submit their application once if (model.Submitted != null && !Request.IsLocal) { return(Content("App for code '" + id + "' submitted on '" + model.Submitted + "'", "text/plain")); } return(View(model)); }
public ActionResult Edit(int?id) { var model = _interns.Load(id) ?? _interns.Create(null); return(View("EditIntern", model)); }