Exemple #1
0
        public HomePageVM()
        {
            playersBL = new PlayersBL();

            PlayerEntity p = playersBL.GetPlayerByUsername(Cache.Instance.username);

            //PlayerEntity p = playersBL.GetPlayerByUsername("BotBurg3r");
            this.Player = new PlayerVM(p.Username, p.FirstName, p.LastName);
        }
 public void AddContact(PlayerVM temp)
 {
     contactsBL.InsertNewContactForPlayer(new PlayerEntity()
     {
         Username = Cache.Instance.username
     },
                                          new PlayerEntity()
     {
         FirstName = temp.FirstName, LastName = temp.LastName, Username = temp.UserName
     });
 }
        public void initParticipantsView()
        {
            Project p = new Project();

            p.Code = this.projectVM.Code;
            projectVM.Participants.Clear();
            List <PlayerEntity> l = projectsBL.GetProjectParticipantsEntity(p.Code);

            foreach (PlayerEntity item in l)
            {
                PlayerVM player = new PlayerVM()
                {
                    FirstName = item.FirstName,
                    LastName  = item.LastName,
                    UserName  = item.Username,
                };
                projectVM.Participants.Add(player);
            }
        }
Exemple #4
0
        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");
        }