Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AspNetStudentPerformanceReport aspNetStudentPerformanceReport = db.AspNetStudentPerformanceReports.Find(id);

            db.AspNetStudentPerformanceReports.Remove(aspNetStudentPerformanceReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,StudentID,SubjectID,Title,Description,LearningConcept,TimeManagement,Homework,ReadingSkills,InstructionFollowing,ProjectLines,Handwriting,PerformanceSkills,Punctuality,Regularity,Assessment")] AspNetStudentPerformanceReport aspNetStudentPerformanceReport)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetStudentPerformanceReport).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SubjectID = new SelectList(db.AspNetSubjects, "Id", "SubjectName", aspNetStudentPerformanceReport.SubjectID);
     ViewBag.StudentID = new SelectList(db.AspNetUsers, "Id", "Email", aspNetStudentPerformanceReport.StudentID);
     return(View(aspNetStudentPerformanceReport));
 }
Пример #3
0
        // GET: AspNetStudentPerformanceReport/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetStudentPerformanceReport aspNetStudentPerformanceReport = db.AspNetStudentPerformanceReports.Find(id);

            if (aspNetStudentPerformanceReport == null)
            {
                return(HttpNotFound());
            }
            return(View(aspNetStudentPerformanceReport));
        }
        public ActionResult PerformanceReport_Detail(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            AspNetStudentPerformanceReport aspNetStudentPerformanceReport = db.AspNetStudentPerformanceReports.Where(x => x.Id == id && x.StudentID == StudentID).FirstOrDefault();

            if (aspNetStudentPerformanceReport == null)
            {
                return(HttpNotFound());
            }
            return(View(aspNetStudentPerformanceReport));
        }
Пример #5
0
        // GET: AspNetStudentPerformanceReport/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetStudentPerformanceReport aspNetStudentPerformanceReport = db.AspNetStudentPerformanceReports.Find(id);

            if (aspNetStudentPerformanceReport == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SubjectID = new SelectList(db.AspNetSubjects, "Id", "SubjectName", aspNetStudentPerformanceReport.SubjectID);
            ViewBag.StudentID = new SelectList(db.AspNetUsers, "Id", "Name", aspNetStudentPerformanceReport.StudentID);
            return(View(aspNetStudentPerformanceReport));
        }
Пример #6
0
        // GET: AspNetStudentPerformanceReport/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AspNetStudentPerformanceReport aspNetStudentPerformanceReport = db.AspNetStudentPerformanceReports.Find(id);

            if (aspNetStudentPerformanceReport == null)
            {
                return(HttpNotFound());
            }
            ViewBag.SubjectID = new SelectList(db.AspNetSubjects.Where(x => x.AspNetClass.SessionID == SessionID), "Id", "SubjectName", aspNetStudentPerformanceReport.SubjectID);
            ViewBag.StudentID = new SelectList(db.AspNetUsers.Where(x => x.AspNetUsers_Session.Any(y => y.SessionID == SessionID)), "Id", "Name", aspNetStudentPerformanceReport.StudentID);
            return(View(aspNetStudentPerformanceReport));
        }
Пример #7
0
        public ActionResult Create([Bind(Include = "Id,StudentID,SubjectID,Title,Description,LearningConcept,TimeManagement,Homework,ReadingSkills,InstructionFollowing,ProjectLines,Handwriting,PerformanceSkills,Punctuality,Regularity,Assessment")] AspNetStudentPerformanceReport aspNetStudentPerformanceReport)
        {
            if (ModelState.IsValid)
            {
                int ss         = Int32.Parse(aspNetStudentPerformanceReport.StudentID);
                var student_id = db.AspNetStudents.Where(x => x.Id == ss).FirstOrDefault().StudentID;
                db.AspNetStudentPerformanceReports.Add(aspNetStudentPerformanceReport);
                aspNetStudentPerformanceReport.StudentID = student_id;
                aspNetStudentPerformanceReport.Date      = DateTime.Now;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ClassID   = new SelectList(db.AspNetClasses.Where(x => x.SessionID == SessionID), "Id", "ClassName");
            ViewBag.SubjectID = new SelectList(db.AspNetSubjects.Where(x => x.AspNetClass.SessionID == SessionID), "Id", "SubjectName", aspNetStudentPerformanceReport.SubjectID);
            ViewBag.StudentID = new SelectList(db.AspNetUsers.Where(x => x.AspNetUsers_Session.Any(y => y.SessionID == SessionID)), "Id", "Email", aspNetStudentPerformanceReport.StudentID);
            return(View(aspNetStudentPerformanceReport));
        }