public static UserProfileProxy GetUserProfileProxy(AuthUser user) { if (user == null) { return(null); } UserProfileProxy proxy = new UserProfileProxy(); proxy.UserID = user.UserID; proxy.Gender = (int)user.Gender; proxy.GenderName = user.GenderName; proxy.Birthday = user.Birthday; proxy.TimeZone = user.TimeZone; proxy.Signature = user.Signature; proxy.SignatureFormat = (int)user.SignatureFormat; proxy.ExtendedFields = new List <UserExtendedValueProxy>(); foreach (UserExtendedValue item in user.ExtendedFields) { proxy.ExtendedFields.Add(GetUserExtendedValueProxy(item)); } return(proxy); }
public ChangePasswordViewModel(string username) { _username = username; SavePasswordCommand = new DelegateCommand(async x => await SavePasswordAsync(x)); _validator = new UserCredentialsValidator(); _loginService = new LoginProxy(); _profileProxy = new UserProfileProxy(); }
private void InitializeUserProfile() { #if UNITY_ANDROID m_GetUserHandler = new GetUserResponseHandler(); m_SetAnonUserHandler = new SetAnonUserResponseHandler(); m_CheckUserChangedHandler = new CheckUserChangedResponseHandler(); m_UserProfileProxy = new UserProfileProxy(); #endif }
public MyProfileViewModel() { _service = new UserProfileProxy(); ReloadData += async(x, e) => await LoadUserDataAsync(); EditDataCommand = new DelegateCommand(x => EditData()); ChangePasswordCommand = new DelegateCommand(x => ChangePassword()); ReloadData?.Invoke(this, EventArgs.Empty); (App.Current as App).Login += async(x, e) => await LoadUserDataAsync(); }
public EditUserDataViewModel(string username) { _username = username; _service = new UserProfileProxy(); SaveDataCommand = new DelegateCommand(async x => await SaveDataAsync()); }
public override void Execute(int userID, DateTime instructDateTime, string datas) { UserProfileProxy proxy = DataReadWrap.Get <UserProfileProxy>(datas); UserBO.Instance.Client_UpdateUserProfile(proxy); }