コード例 #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
                });
            }
        }
コード例 #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
                });
            }
        }
コード例 #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
                });
            }
        }