Exemple #1
0
        public void clickOnSpace(object sender, MouseEventArgs e)
        {
            chosenRow = tableLayoutPanel1.GetRow((Label)sender);

            if (chosenRow != 0)
            {
                int         id = issues[chosenRow - 1].issue_id;
                ManageIssue mi = new ManageIssue(id);
                mi.ShowDialog();
                //opened = true;
            }
        }
Exemple #2
0
        public void LoadAllIssues(List <issue> iss = null)
        {
            tableLayoutPanel1.RowCount = 1;
            tableLayoutPanel1.Controls.Clear();
            chosenRow = -1;

            if (iss == null)
            {
                issues = id.getAllIssues();
                issues.Reverse();

                foreach (issue i in issues)
                {
                    this.AddItem(i.issue_title, i.issue_description, itd.getIssueTypeById(i.issue_type_id).issue_title, i.issue_date_created.ToString());
                }

                foreach (Label space in this.tableLayoutPanel1.Controls)
                {
                    space.MouseClick += new MouseEventHandler(clickOnSpace);
                }

                if (chosenRow != -1)
                {
                    int         id = issues[chosenRow - 1].issue_id;
                    ManageIssue mi = new ManageIssue(id);
                    mi.ShowDialog();
                }
            }
            else
            {
                issues = iss;
                issues.Reverse();

                foreach (issue i in issues)
                {
                    this.AddItem(i.issue_title, i.issue_description, itd.getIssueTypeById(i.issue_type_id).issue_title, i.issue_date_created.ToString());
                }

                foreach (Label space in this.tableLayoutPanel1.Controls)
                {
                    space.MouseClick += new MouseEventHandler(clickOnSpace);
                }

                if (chosenRow != -1)
                {
                    int         id = issues[chosenRow - 1].issue_id;
                    ManageIssue mi = new ManageIssue(id);
                    mi.ShowDialog();
                }
            }
        }