Exemple #1
0
        public ActionResult incidentResponse(int?id)
        {
            var x = m.IncidentGetOne(id.GetValueOrDefault());

            if (x.offence.ToLower() == "minor")
            {
                string msg = "The involved student(s) should lose marks for this assignment";
                m.closeIncident(id.GetValueOrDefault(), msg);
                return(RedirectToAction("details", new { id = id }));
            }
            else if (x.offence.ToLower() == "major" || x.offence.ToLower() == "minor (repeat)")
            {
                var form = new IncidentResponse();
                form.incidentID = id.GetValueOrDefault();

                form.instructorID = x.Instructor.Id;
                form.description  = x.description;
                return(View(form));
            }
            return(RedirectToAction("details", new { id = id }));
        }
Exemple #2
0
        public ActionResult incidentResponse(int?id, IncidentResponse newItem)
        {
            bool result = m.closeIncident(id.GetValueOrDefault(), newItem.response);

            return(RedirectToAction("Index"));
        }