public IActionResult EditData(Guid Id)
        {
            var data = _student.GetStudent(Id);

            if (data.PermanentAddress == null)
            {
                data.PermanentAddress = new StudentAddress();
            }
            if (data.CurrentAddress == null)
            {
                data.CurrentAddress = new StudentAddress();
            }
            if (data.Guardians == null)
            {
                data.Guardians = new List <StudentGuardian>();
                data.Guardians.Add(new StudentGuardian());
            }

            AddPageHeader("Students");
            AddBreadcrumb("Students", "/student");
            AddBreadcrumb(data.StudentId, "");


            return(View(data));
        }
        public IActionResult ReadData(Guid Id)
        {
            var data = _student.GetStudent(Id);

            AddPageHeader("Students");
            AddBreadcrumb("Students", "/student");
            AddBreadcrumb(data.StudentId, "");


            return(View(data));
        }
Example #3
0
 public Student FindStudent(string studentId)
 {
     return(_studentManager.GetStudent(studentId));
 }
Example #4
0
 public async Task <ActionResult <Student> > GetStudentById(int id)
 {
     return(await studentServices.GetStudent(id));
 }