private void FormIssueDashboard_Load(object sender, EventArgs e)
        {
            this.CenterToScreen();
            UpdateIssuesByMonth(_SelectedProjectId);
            labelissues.Text = Convert.ToString(_IssueRepository.GetTotalNumberOfIssues(_SelectedProjectId));
            int numberofissues = Convert.ToInt32(_IssueRepository.GetTotalNumberOfIssues(_SelectedProjectId));

            /*
             * foreach (string issues in _IssueRepository.GetIssuesByMonth(_SelectedProjectId))
             * {
             *  listBox1.Items.Add(issues);
             * }
             *
             */
            foreach (string discoverer in _IssueRepository.GetIssuesByDiscoverer(_SelectedProjectId))
            {
                int    count       = discoverer.Count();
                string stringToAdd = discoverer + ": " + numberofissues;

                if (listBoxIssuesByDiscoverer.Items.Contains(stringToAdd) == false)
                {
                    listBoxIssuesByDiscoverer.Items.Add(stringToAdd);
                }
            }
        }
        private void issuesDashboardToolStripMenuItem_Click(object sender, System.EventArgs e)
        {
            int issues = issueRepository.GetTotalNumberOfIssues(projectSelection);
            FormIssueDashboard form = new FormIssueDashboard(issues, issueRepository, projectSelection);

            form.ShowDialog();
            form.Dispose();
        }
示例#3
0
        public FormDashboard(string pname)
        {
            InitializeComponent();
            this.CenterToParent();
            int y = 0;

            foreach (Project p in FakeProjectRepository._Projects)
            {
                if (pname == p.Name)
                {
                    id = p.Id;
                }
            }
            DateTime      today  = DateTime.Today;
            int           year   = today.Year;
            List <string> Months = newissue.GetIssuesByMonth(id);

            foreach (string x in Months)
            {
                y = 0;
                foreach (Issue t in FakeIssueRepository._Issues)
                {
                    if (t.DiscoveryDate.Month.ToString() == x)
                    {
                        y++;
                    }
                }
                listBox1.Items.Add(year + " - " + x + ": " + y);
            }

            List <string> Discovered = newissue.GetIssuesbyDiscoverer(id);

            foreach (string x in Discovered)
            {
                y = 0;
                foreach (Issue t in FakeIssueRepository._Issues)
                {
                    if (t.Discoverer == x)
                    {
                        y++;
                    }
                }
                foreach (AppUser user in FakeAppUserRepository._AppUsers.Values)
                {
                    if (user.UserName == x)
                    {
                        listBox2.Items.Add(user.LastName + ", " + user.FirstName + ": " + y);
                    }
                }
            }

            label4.Text = newissue.GetTotalNumberOfIssues(id).ToString();
        }
示例#4
0
        private void IssueDashboard_Load(object sender, EventArgs e)
        {
            List <string> text = IssueRepository.GetIssuesByDiscoverer(_SelectedProjectId);

            foreach (string s in text)
            {
                listbxDiscoverer.Items.Add(s);
            }
            List <string> months = IssueRepository.GetIssuesByMonth(_SelectedProjectId);

            foreach (string m in months)
            {
                listbxMonth.Items.Add(m);
            }
            lblTotalIssues.Text = IssueRepository.GetTotalNumberOfIssues(_SelectedProjectId).ToString();
        }
示例#5
0
        private void FormDashboard_Load(object sender, EventArgs e)
        {
            this.CenterToParent();

            int i = _Issues.GetTotalNumberOfIssues(_selId);

            IDBox.Text = (i.ToString());

            List <String> IssueMonth = _Issues.GetIssuesByMonth(_selId);
            List <String> users      = _Issues.GetIssuesByDiscoverer(_selId);

            foreach (string monthly in IssueMonth)
            {
                MonthBox.Items.Add(monthly);
            }
            foreach (string DiscoverersIssues in users)
            {
                DiscoverBox.Items.Add(DiscoverersIssues);
            }
        }