Example #1
0
        private void btnViewFixedBug_Click(object sender, EventArgs e)
        {
            Int32 selectedRowCount =
                dataGridView1.Rows.GetRowCount(DataGridViewElementStates.Selected);

            if (selectedRowCount > 0)
            {
                DataGridViewRow rowIndex = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex];
                //   FormFixBug fixBug = new FormFixBug(Convert.ToInt32(rowIndex.Cells["bug_id"].Value), user);
                ///  fixBug.Show();
                bugController = new BugController();
                fixedBug      = bugController.getFixedBugById((Convert.ToInt32(rowIndex.Cells["fixed ID"].Value)));
                FormViewFixedBug viewFixedBug = new FormViewFixedBug(fixedBug);
                viewFixedBug.Show();



                // label1.Text = "" + myDataGrid.CurrentCell.RowIndex + Convert.ToString(rowIndex.Cells["bug_id"].Value);
            }
            else
            {
                MessageBox.Show("Select a row to fix bug");
            }
        }