Example #1
0
        public ActionResult SingleStudent(int StudentID)
        {
            var Student = StuBO.GetStudentByID(StudentID);

            ViewBag.Errors = TempData["Errors"];
            return(View(Student));
        }
        public ActionResult CreateStudentAccount(int StudentID)
        {
            var student = StuBO.GetStudentByID(StudentID);

            if (student.User == null)
            {
                var user = AccBO.CreateUser(student.FullName);
                user.RoleID  = 3;
                student.User = user;
                StuBO.UpdateExist(student);
            }
            return(RedirectToAction("StudentAccountList", "Admin"));
        }
 public ActionResult AddStudent(int ClassID, String StudentID)
 {
     String[] tmp = StudentID.Split(',');
     for (int i = 0; i < tmp.Length; i++)
     {
         int test    = int.Parse(tmp[i]);
         var Student = StuBO.GetStudentByID(test);
         Student.ClassID = ClassID;
         StuBO.UpdateExist(Student);
     }
     return(RedirectToAction("StudentList", new { ClassID = ClassID }));
 }
 private static string GetUserName(FaceRecognizer.PredictionResult PR)
 {
     if (PR.Label == -1)
     {
         return("Unknown");
     }
     else
     {
         StudentBusiness StuBO   = new StudentBusiness();
         var             Student = StuBO.GetStudentByID(PR.Label);
         return(Student.StudentCode + " - " + Student.FullName);
     }
 }
        //remove student from studenrlist of the rollcall
        public ActionResult AddStudent(int?RollCallID, String StudentID)
        {
            RollCall rollcall = RollBO.GetRollCallByID(RollCallID.Value);

            String[] tmp = StudentID.Split(',');
            for (int i = 0; i < tmp.Length; i++)
            {
                int test    = int.Parse(tmp[i]);
                var Student = StuBO.GetStudentByID(test);
                rollcall.Students.Add(Student);
                RollBO.Update(rollcall);
            }
            return(RedirectToAction("RollCallStudentList", new { RollCallID = RollCallID }));
        }
        public ActionResult StudentReport(int StudentID, int SemesterID)
        {
            StudentBusiness  StuBO = new StudentBusiness();
            SemesterBusiness SemBO = new SemesterBusiness();

            var stu = StuBO.GetStudentByID(StudentID);
            var sem = SemBO.GetSemesterByID(SemesterID);

            String FileName = stu.StudentCode + "_" + sem.SemesterName + ".xlsx";
            String FilePath = Server.MapPath("~/Content/Temp/" + FileName);

            StuBO.CreateStudentReport(StudentID, SemesterID, FilePath);

            return(File(FilePath, ExcelMimeType, FileName));
        }
Example #7
0
        //
        // GET: /Student/Details/5

        public ViewResult Details(int id)
        {
            Student student = StuBO.GetStudentByID(id);

            return(View(student));
        }