예제 #1
0
        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));
        }
예제 #2
0
        public ActionResult Edit(int?id)
        {
            var model = _interns.Load(id) ?? _interns.Create(null);

            return(View("EditIntern", model));
        }