Example #1
0
            public void Refresh()
            {
                WaveguideDB wgDB = new WaveguideDB();

                bool success = wgDB.GetAllProjects(ShowArchivedProjects);

                if (success)
                {
                    Projects.Clear();

                    for (int i = 0; i < wgDB.m_projectList.Count(); i++)
                    {
                        ProjectItem pitem = new ProjectItem();
                        pitem.ProjectName = wgDB.m_projectList[i].Description;
                        pitem.ProjectID   = wgDB.m_projectList[i].ProjectID;
                        pitem.Archived    = wgDB.m_projectList[i].Archived;
                        pitem.TimeStamp   = wgDB.m_projectList[i].TimeStamp;

                        bool IsAssigned = new bool();
                        IsAssigned = false;
                        success    = wgDB.IsUserAssignedToProject(User.UserID, pitem.ProjectID, ref IsAssigned);
                        if (success)
                        {
                            pitem.AssignedToProject = IsAssigned;
                        }

                        Projects.Add(pitem);
                    }
                }
            }
Example #2
0
            public void Refresh()
            {
                WaveguideDB wgDB = new WaveguideDB();

                bool success = wgDB.GetAllUsers();

                Users.Clear();

                if (success)
                {
                    for (int i = 0; i < wgDB.m_userList.Count(); i++)
                    {
                        UserItem uitem = new UserItem();
                        uitem.UserID            = wgDB.m_userList[i].UserID;
                        uitem.Fullname          = wgDB.m_userList[i].Lastname + ", " + wgDB.m_userList[i].Firstname;
                        uitem.AssignedToProject = false;

                        bool IsAssigned = new bool();
                        IsAssigned = false;
                        success    = wgDB.IsUserAssignedToProject(wgDB.m_userList[i].UserID, ProjectID, ref IsAssigned);
                        if (success)
                        {
                            uitem.AssignedToProject = IsAssigned;
                        }

                        Users.Add(uitem);
                    }
                }
            }