예제 #1
0
        public ActionResult RequestEndorsement(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RequestForm requestForm = db.RequestForms.Find(id);

            AllFormModel allFormModels = new AllFormModel()
            {
                Form = db.Forms.Find(id),
                SuspendSubjectForm = db.SuspendSubjectForms.Find(id)
            };

            if (requestForm == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Comment = new List <FormComment>(db.FormComments.Where(fc => fc.FormID == id));
            ViewBag.FormID  = new SelectList(db.Forms, "ID", "Type", requestForm.FormID);
            return(View(requestForm));
        }
예제 #2
0
        public ActionResult SuspendSemesterEndorsement(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SuspendSemesterForm suspendSemesterForm = db.SuspendSemesterForms.Find(id);

            AllFormModel allFormModels = new AllFormModel()
            {
                Form = db.Forms.Find(id),
                SuspendSubjectForm = db.SuspendSubjectForms.Find(id)
            };

            if (suspendSemesterForm == null)
            {
                return(HttpNotFound());
            }

            ViewBag.Comment = new List <FormComment>(db.FormComments.Where(fc => fc.FormID == id));
            ViewBag.FormID  = new SelectList(db.Forms, "ID", "Type,PreviousSemester,TuitionFee,TwoPrevSemester,IsWeekBefore", suspendSemesterForm.FormID);
            return(View(suspendSemesterForm));
        }