Beispiel #1
0
        public void Refresh()
        {
            Projects.Clear();

            bool success = wgDB.GetAllProjects(ShowArchivedProjects);

            if (success)
            {
                for (int i = 0; i < wgDB.m_projectList.Count(); i++)
                {
                    ProjectSimple project = new ProjectSimple();
                    project.Description = wgDB.m_projectList[i].Description;
                    project.ProjectID   = wgDB.m_projectList[i].ProjectID;
                    project.Archived    = wgDB.m_projectList[i].Archived;
                    project.TimeStamp   = wgDB.m_projectList[i].TimeStamp;

                    Projects.Add(project);

                    List <UserContainer> users;
                    success = wgDB.GetAllUsersForProject(project.ProjectID, out users);

                    if (success)
                    {
                        for (int j = 0; j < users.Count(); j++)
                        {
                            UserFullname ufn = new UserFullname();
                            ufn.Fullname = users[j].Lastname + ", " + users[j].Firstname;
                            project.Users.Add(ufn);
                        }
                    }
                }
            }
        }