private void ProfileSec_Load(object sender, EventArgs e) { //get User var user = LoginHelperService.GetCurrentUser(); // add texts to fields //ProfilePic.Load(user.ImageUrl); ProfilePic.ImageLocation = user.ImageUrl; Nameuser.Text = $"{user.User.Name} {user.User.Surname}"; Username.Text = user.Username; Email.Text = user.User.Email; Age.Text = $"{user.User.Age.ToString()} Years Old"; }
private void ProfileSec_Load(object sender, EventArgs e) { var user = LoginHelperService.GetCurrentUser(); if (user != null) { Nameuser.Text = $"{user.Student.Name} {user.Student.Surname}"; Username.Text = user.Username; Email.Text = user.Student.Email; Age.Text = $"{user.Student.Age.ToString()} Years Old"; PhoneNum.Text = user.Student.MobilePhone; Degree.Text = user.Student.Degree.ToString(); } }
public ContactsSection() { InitializeComponent(); _currentUser = LoginHelperService.GetCurrentUser(); _contactService = new ContactService() { AddContactDel = SocialovateService.Instance.AddUserContact, GetAllContactsDel = SocialovateService.Instance.GetAllUserContacts, FilterContactsByUsernameDel = SocialovateService.Instance.SearchUserContactByUsername, SearchInAllAcountsDel = SocialovateService.Instance.SearchForContactInDB }; _userContacts = _contactService.GetUserContacts(_currentUser); }