Esempio n. 1
0
        public async Task <ResultVM> SaveRepsUnilateral(UnilateralExercisesHistoryVM reps)
        {
            try
            {
                ResultVM resultVM = await HttpMethods <UnilateralExercisesHistoryVM> .PostAsync(Client, reps, "/SaveRepsUnilateral");

                return(resultVM);
            }
            catch (Exception ex)
            {
                return(new ResultVM {
                    Message = ex.Message,
                    Status = Status.Error
                });
            }
        }
        public async Task <ResultVM> CreateCourse(CourseVM course)
        {
            try
            {
                ResultVM result = await HttpMethods <CourseVM> .PostAsync(Client, course, "/createCourse");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Status = Status.Error,
                    Message = e.Message
                });
            }
        }
        public async Task <ResultVM> AddMark(MarkVM markVM)
        {
            try
            {
                ResultVM result = await HttpMethods <MarkVM> .PostAsync(Client, markVM, "/addMark");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Status = Status.Error,
                    Message = e.Message
                });
            }
        }
        public async Task <ResultVM> SubscribeStudents(SubscribeStudentsVM studentVMs)
        {
            try
            {
                ResultVM model = await HttpMethods <SubscribeStudentsVM> .PostAsync(Client, studentVMs, "/subscribeStudents");

                return(model);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Status = Status.Error,
                    Message = e.Message
                });
            }
        }
Esempio n. 5
0
        public async Task <ResultVM> Register(RegisterVM registerVM)
        {
            try
            {
                ResultVM result = await HttpMethods <RegisterVM> .PostAsync(Client, registerVM, "/register");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Message = e.Message,
                    Status = Status.Error
                });
            }
        }
Esempio n. 6
0
        public async Task <ResultVM> Login(LoginVM loginVM)
        {
            try
            {
                ResultVM result = await HttpMethods <LoginVM> .PostAsync(Client, loginVM, "/login");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Message = e.Message,
                    Status = Status.Error
                });
            }
        }
Esempio n. 7
0
        public async Task <ResultVM> AddTeachers(List <TeacherVM> selectedTeachers)
        {
            try
            {
                ResultVM result = await HttpMethods <List <TeacherVM> > .PostAsync(Client, selectedTeachers, "/addTeachers");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Message = e.Message,
                    Status = Status.Error
                });
            }
        }
Esempio n. 8
0
        public async Task <ResultVM> AddSchool(SchoolVM newSchool)
        {
            try
            {
                ResultVM result = await HttpMethods <SchoolVM> .PostAsync(Client, newSchool, "/addSchool");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Status = Status.Error,
                    Message = e.Message
                });
            }
        }
Esempio n. 9
0
        public async Task <ResultVM> CreateRole(RoleVM roleVM)
        {
            try
            {
                ResultVM result = await HttpMethods <RoleVM> .PostAsync(Client, roleVM, "/createRole");

                return(result);
            }
            catch (Exception e)
            {
                return(new ResultVM
                {
                    Message = e.Message,
                    Status = Status.Error
                });
            }
        }
Esempio n. 10
0
        public async Task <ResultVM> SaveUserRoles(UpdateUserRolesVM razorModel)
        {
            try
            {
                ResultVM result = await HttpMethods <UpdateUserRolesVM> .PostAsync(Client, razorModel, "/saveUserRoles");

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