public string AgeRaceGenderStr(UserRecord theUser)
        {
            DateTime today = DateTime.Now;
            int yearsOld = today.Year - theUser.dob.Year;

            string raceStr = LettuceServer.Instance.EthnicityName (theUser.ethnicity).Localize();
            string genderStr = LettuceServer.Instance.GenderName (theUser.gender).Localize();

            return String.Format ("AgeRaceGender_String".Localize(), yearsOld, raceStr, genderStr);
        }
 public string CityStateStr(UserRecord theUser)
 {
     return String.Format ("CityState_String".Localize(), theUser.city, theUser.state);
 }
Ejemplo n.º 3
0
        public void Logout()
        {
            string fullURL = "user/logout";

            RestRequest request = new RestRequest(fullURL, Method.POST);

            apiClient.Execute(request);

            _currentUser = null;
        }
Ejemplo n.º 4
0
		public void FacebookLogin(string userId, string token, UserRecord_callback callback)
		{
			string fullURL = "user/facebooklogin";

			RestRequest request = new RestRequest(fullURL, Method.POST);
			//request.AddHeader("Content-Type", "application/json; charset=utf-8");
			//request.RequestFormat = DataFormat.Json;
			request.AddParameter("id", userId);
			request.AddParameter("token", token);


			apiClient.ExecuteAsync<UserRecord>(request, (response) =>
				{
					UserRecord newUser = response.Data;
					if (newUser != null)
					{
						_currentUser = newUser;
						callback(newUser);
					}
					else
						callback(null);
				});
		}