Exemple #1
0
        //
        public ActionResult InactiveStudent(int id)
        {
            var stu = StuBO.GetStudentByID(id);

            stu.IsActive = false;
            StuBO.UpdateExist(stu);
            return(RedirectToAction("Index"));
        }
        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 }));
 }