Example #1
0
        public UserDetailStruct GetUserDetail(uint userID)
        {
            UserDetailStruct result = new UserDetailStruct();

            access.SelectUser(userID);
            result.userID = userID;
            try
            {
                access.GetUserName(out result.firstName, out result.lastName);
            }
            catch (Exception)
            {
                var response = new HttpResponseMessage(HttpStatusCode.NotFound)
                {
                    Content      = new StringContent("User details could not be retreived"),
                    ReasonPhrase = "User could not be found"
                };
                throw new HttpResponseException(response);
            }
            return(result);
        }
Example #2
0
 public void GetUserName(out string fname, out string lname)
 {
     userAccess.GetUserName(out fname, out lname);
 }