示例#1
0
        //[HttpPost][ValidateAntiForgeryToken]
        //public async Task<ActionResult> IndexCourseStat(int? id)
        //{
        //    try
        //    {
        //        ViewBag.Dept = new SelectList(d.GetDeptList(), "Value", "Text");

        //        VMDepartment vm = new VMDepartment();
        //        await Task.Run(() => vm.CourseStatistics(id));
        //        return View(vm);
        //    }
        //    catch (Exception e)
        //    {
        //        return RedirectToAction("IndexCourseStat");
        //    }
        //}
        #endregion

        #region Student Settings

        // GET: UCRMS
        public async Task <ActionResult> IndexStudent()
        {
            VM_Student student = new VM_Student();
            await Task.Run(() => student.GetStudents());

            return(View(student));
        }
示例#2
0
        // GET: UCRMS/Delete/5
        public ActionResult DeleteStudent(int?id)
        {
            VM_Student st = new VM_Student();

            ViewBag.student = st.GetStudent(id);
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Student student = db.Students.Find(id);

            if (student == null)
            {
                return(HttpNotFound());
            }
            return(View(student));
        }