示例#1
0
        internal StudentDTO PutStudent(StudentDTO studentDTO)
        {
            try
            {
                var url    = WEBAPIURL + WEBAPI_STUDENT + "/" + studentDTO.Id;
                var result = Put(studentDTO, url);

                if (result)
                {
                    return(studentDTO);
                }

                return(null);
            }
            catch (Exception e)
            {
                return(null);
            }
        }
示例#2
0
        internal StudentDTO PostStudent(StudentDTO studentDTO)
        {
            try
            {
                var url    = WEBAPIURL + WEBAPI_STUDENT;
                var result = PostObject(studentDTO, url);

                if (result)
                {
                    return(studentDTO);
                }

                return(null);
            }
            catch (Exception e)
            {
                return(null);
            }
        }