public JsonResult CancelApplicationJSON(string comment, int id)
 {
     Application application = db.Applications.Single(x => x.Application_Id == id);
     Application_Cancel application_cancel = new Application_Cancel();
     application_cancel = new Application_Cancel();
     application_cancel.Status = true;
     application_cancel.Comment = comment;
     application_cancel.Application_Id = application.Application_Id;
     db.Application_Cancel.AddObject(application_cancel);
     db.SaveChanges();
     LogHelper.writeToStudentLog(new string[] { CookieHelper.Username }, (CookieHelper.Username + " Requested a cancelation for the application :" + application.Course.Course_Name + "by the Student : " + application.Student.Client.GivenName + " " + application.Student.Client.LastName), LogHelper.LOG_UPDATE, LogHelper.SECTION_PROFILE);
     return Json(new { Success = true }, JsonRequestBehavior.AllowGet);
 }
 public ActionResult CancelApplication(string comment, int id)
 {
     Application application = db.Applications.Single(x => x.Application_Id == id);
     Application_Cancel application_cancel = new Application_Cancel();
     application_cancel = new Application_Cancel();
     application_cancel.Status = true;
     application_cancel.Comment = comment;
     application_cancel.Application_Id = application.Application_Id;
     db.Application_Cancel.AddObject(application_cancel);
     db.SaveChanges();
     LogHelper.writeToStudentLog(new string[] { CookieHelper.Username }, (CookieHelper.Username + " Requested a cancelation for the application :" + application.Course.Course_Name + "by the Student : " + application.Student.Client.GivenName + " " + application.Student.Client.LastName), LogHelper.LOG_UPDATE, LogHelper.SECTION_PROFILE);
     return Redirect(HttpContext.Request.UrlReferrer.AbsolutePath);
 }