Ejemplo n.º 1
0
 public InfoCardViewModel( InfoCard iCard)
 {
     this.UserId = iCard.UserId;
     this.UserName = iCard.UserProfile.UserName;
     this.NumberOfProjects = iCard.NumberOfProjects;
     this.NumberOfBugs = iCard.NumberOfBugs;
     this.LastActivity = iCard.LastActivity;
     this.LastAction = iCard.LastAction;
 }
Ejemplo n.º 2
0
        public static void AddUserInfoCard(int userId)
        {
            BugTrackerEntities db = new BugTrackerEntities();
            InfoCard iCard = new InfoCard
            {
                UserProfile = db.UserProfiles.Find(userId),
                NumberOfBugs = 0,
                NumberOfProjects = 0,
                LastActivity = DateTime.Now,
                LastAction = "Registration of the Tester."
            };

            db.InfoCards.Add(iCard);
            db.SaveChanges();
        }