Ejemplo n.º 1
0
        public async Task <ResultVM> UpdateStudent(StudentVM studentVM)
        {
            try
            {
                ResultVM result = await HttpMethods <StudentVM> .PutAsync(Client, studentVM, "/updateStudent");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Message = e.Message,
                    Status = Status.Error
                });
            }
        }
Ejemplo n.º 2
0
        public async Task <ResultVM> EditCourse(CourseVM course)
        {
            try
            {
                ResultVM result = await HttpMethods <CourseVM> .PutAsync(Client, course, "/editCourse");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Status = Status.Error,
                    Message = e.Message
                });
            }
        }
Ejemplo n.º 3
0
        public async Task <ResultVM> UpdateTeacher(TeacherVM teacherVM)
        {
            try
            {
                ResultVM resultVM = await HttpMethods <TeacherVM> .PutAsync(Client, teacherVM, "/updateTeacher");

                return(resultVM);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Message = e.Message,
                    Status = Status.Error
                });
            }
        }