public ProfilePage() { InitializeComponent(); contactBL = new ContactsBL(); vm = new ProfilePageVM(); this.DataContext = vm; }
public ContactsVM() { contactsBL = new ContactsBL(); playersBL = new PlayersBL(); PersonalContactList = new ObservableCollection <ContactVM>(); AllPlayers = new ObservableCollection <PlayerVM>(); InitializeVm(); }
public ProfilePageVM() { playersBL = new PlayersBL(); contactsBL = new ContactsBL(); PlayerEntity p = playersBL.GetPlayerByUsername(Cache.Instance.username); //PlayerEntity p = playersBL.GetPlayerByUsername("BotBurg3r"); this.Player = new PlayerVM(p.Username, p.FirstName, p.LastName); ContactEntity itemFromBL = this.contactsBL.GetPlayerInfo(p.Username); this.Contact = new ContactVM(p.Username, p.FirstName, p.LastName); foreach (string infoItem in itemFromBL.ContactInfo) { this.Contact.Info.Add(infoItem); } this.phone = GetInfoProp("Phone"); this.email = GetInfoProp("Email"); }
public ContactsController(IContactsBL contactsBL) { _contactsBL = contactsBL; }