Esempio n. 1
0
        public bool PostUserProfile(UserProfileDAO uspro)
        {
            UserProfileServiceClient client = new UserProfileServiceClient();

            try
            {
                bool result = client.CreateUserProfile(uspro);
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Esempio n. 2
0
        public UserProfileDAO GetUserProfile(int id)
        {
            UserProfileServiceClient client = new UserProfileServiceClient();

            try
            {
                UserProfileDAO result = client.GetUserProfileByID(id);
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Esempio n. 3
0
        public IEnumerable<UserProfileDAO> GetUserProfiles()
        {
            UserProfileServiceClient client = new UserProfileServiceClient();

            try
            {
                IEnumerable<UserProfileDAO> result = client.GetUserProfiles();
                return result;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
        }
Esempio n. 4
0
        public bool DeleteUserProfile(int id)
        {
            try
            {
                UserProfileServiceClient client = new UserProfileServiceClient();

                if (client.DeleteUserProfile(id))
                    return true;
            }
            catch (FaultException<KaskServiceException> e)
            {
                throw new HttpException(e.Message);
            }
            return false;
        }