コード例 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            ImageDAO         imageDAO      = new ImageDAO();
            CodeDAO          codeDAO       = new CodeDAO();
            SourceControlDAO sourceControl = new SourceControlDAO();
            BugDAO           bugDAO        = new BugDAO();

            DialogResult dr = MessageBox.Show("Are you sure want to delete this bug?", "Are you sure", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);

            if (dr == DialogResult.Yes)
            {
                try
                {
                    codeDAO.Delete(bugId);
                    imageDAO.Delete(bugId);
                    bugDAO.Delete(bugId);
                    sourceControl.Delete(bugId);

                    MessageBox.Show("Deleted");
                    this.Dispose();
                    new Bugs().Show();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
コード例 #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            string codeFileName = bug.Codes.CodeFileName;
            string codeFilePath = bug.Codes.CodeFilePath;
            string c            = fastColoredTextBox1.Text;

            FixerDAO fixerDAO = new FixerDAO();
            BugDAO   bugDAO   = new BugDAO();

            Fixer fixer = new Fixer
            {
                FixedBy = Login.userId,
                BugId   = Program.bugId
            };

            try
            {
                fixerDAO.Insert(fixer);
                bugDAO.BugFixed(Program.bugId);
                MessageBox.Show("Oh great work");
                this.Dispose();
                new Bugs().Show();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            string path = "code/" + codeFileName + ".txt";

            using (StreamWriter sw = File.CreateText(path))
            {
                sw.WriteLine(c);
            }
        }
コード例 #3
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        public void load_tester_bugs()
        {
            BugDAO        us      = new BugDAO();
            DataTable     data    = us.GetTesterBugs(id);
            BindingSource bsource = new BindingSource();

            bsource.DataSource    = data;
            Tester_bug.DataSource = bsource;
        }
コード例 #4
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        public void load_Programmer_bugs()
        {
            BugDAO        us      = new BugDAO();
            DataTable     data    = us.GetProgrammerBugs(id);
            BindingSource bsource = new BindingSource();

            bsource.DataSource  = data;
            Tbl_grid.DataSource = bsource;
        }
コード例 #5
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        private void btn_view_Click(object sender, EventArgs e)
        {
            BugDAO            us      = new BugDAO();
            OracleDataAdapter data    = us.GetBugs();
            DataTable         dataset = new DataTable();

            data.Fill(dataset);
            BindingSource bsource = new BindingSource();

            bsource.DataSource        = dataset;
            Tbl_data_error.DataSource = bsource;
            data.Update(dataset);
        }
コード例 #6
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        private void button4_Click_2(object sender, EventArgs e)
        {
            BugDAO            us      = new BugDAO();
            OracleDataAdapter data    = us.GetBugs();
            DataTable         dataset = new DataTable();

            data.Fill(dataset);
            BindingSource bsource = new BindingSource();

            bsource.DataSource = dataset;
            BugView.DataSource = bsource;
            data.Update(dataset);
        }
コード例 #7
0
        public TesterDash()
        {
            InitializeComponent();
            panel1.AutoScroll = false;
            panel1.HorizontalScroll.Enabled = false;
            panel1.HorizontalScroll.Visible = false;
            panel1.HorizontalScroll.Maximum = 0;
            panel1.AutoScroll = true;

            LoopPanel loop = new LoopPanel();
            BugDAO    bug  = new BugDAO();

            loop.loopPanel(bug.getAllBugs(), panel1, this, new UpdateBug(false));
        }
コード例 #8
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        public void loadErrors()
        {
            BugDAO            us      = new BugDAO();
            OracleDataAdapter data    = us.GetBugs();
            DataTable         dataset = new DataTable();

            data.Fill(dataset);
            BindingSource bsource = new BindingSource();

            bsource.DataSource     = dataset;
            Error_table.DataSource = bsource;
            Tbl_grid1.DataSource   = bsource;
            Tbl_grid2.DataSource   = bsource;
            data.Update(dataset);
        }
コード例 #9
0
        public void getAllBugsTest()
        {
            BugDAO     bugDAO = new BugDAO();
            List <Bug> bug    = null;

            try
            {
                bug = bugDAO.getAllBugs();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Assert.AreEqual("", bug);
        }
コード例 #10
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        private void tbl_bug_view_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                MessageBox.Show("You Cannot Select This Row");
            }
            else
            {
                String value = BugView.Rows[e.RowIndex].Cells[0].Value.ToString();
                bug_id = int.Parse(value);

                BugDAO        us      = new BugDAO();
                DataTable     data    = us.GetBugs(bug_id);
                BindingSource bsource = new BindingSource();
                bsource.DataSource          = data;
                Tbl_data_history.DataSource = bsource;
            }
        }
コード例 #11
0
        private void Bugs_Load(object sender, EventArgs e)
        {
            panelBugs.AutoScroll = false;
            panelBugs.HorizontalScroll.Enabled = false;
            panelBugs.HorizontalScroll.Visible = false;
            panelBugs.HorizontalScroll.Maximum = 0;
            panelBugs.AutoScroll = true;

            panelAssigned.AutoScroll = false;
            panelAssigned.HorizontalScroll.Enabled = false;
            panelAssigned.HorizontalScroll.Visible = false;
            panelAssigned.HorizontalScroll.Maximum = 0;
            panelAssigned.AutoScroll = true;

            BugDAO bugDao = new BugDAO();

            try
            {
                List <Bug> list         = bugDao.getAllBugs();
                var        newLoopPanel = new LoopPanel();
                var        newUpdateBug = new UpdateBug(false);
                newLoopPanel.loopPanel(list, panelBugs, this, newUpdateBug);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            try
            {
                List <Bug> bug          = bugDao.GetAllBugsByProgrammerId(Login.userId);
                var        newLoopPanel = new LoopPanel();
                var        newUpdateBug = new UpdateBug(true);
                newLoopPanel.loopPanel(bug, panelAssigned, this, newUpdateBug);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
コード例 #12
0
        private void Bugs_Load(object sender, EventArgs e)
        {
            panelBugs.AutoScroll = false;
            panelBugs.HorizontalScroll.Enabled = false;
            panelBugs.HorizontalScroll.Visible = false;
            panelBugs.HorizontalScroll.Maximum = 0;
            panelBugs.AutoScroll = true;

            panelAssigned.AutoScroll = false;
            panelAssigned.HorizontalScroll.Enabled = false;
            panelAssigned.HorizontalScroll.Visible = false;
            panelAssigned.HorizontalScroll.Maximum = 0;
            panelAssigned.AutoScroll = true;

            BugDAO    bugDao = new BugDAO();
            ArrayList list   = bugDao.getAllBugs();

            foreach (var l in list)
            {
                Console.WriteLine(l);
            }
        }
コード例 #13
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        private void tbl_data_error_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                MessageBox.Show("You Cannot Select This Row");
            }
            else
            {
                BugDAO bg    = new BugDAO();
                String value = Tbl_data_error.Rows[e.RowIndex].Cells[0].Value.ToString();
                Tbl_data_error_id = int.Parse(value);
                DataTable dr = bg.GetAllBugs(Tbl_data_error_id);
                if (dr.Rows.Count > 0)
                {
                    txt_program_name.Text = "Program:  " + dr.Rows[0][1].ToString();
                    txt_class_name.Text   = "Class:  " + dr.Rows[0][2].ToString();
                    txt_method_name.Text  = "Method:  " + dr.Rows[0][3].ToString();
                    txt_symptom1.Text     = "Symptoms:  " + dr.Rows[0][6].ToString();
                    txt_cause1.Text       = "Cause:  " + dr.Rows[0][7].ToString();
                    txt_date1.Text        = " Date:  " + dr.Rows[0][5].ToString();
                    txt_description1.Text = "Image name:  " + dr.Rows[0][9].ToString();
                    txt_found_by.Text     = "Found by: " + dr.Rows[0][12].ToString();
                    linkLabel1.Text       = dr.Rows[0][10].ToString();
                    txt_source1.Text      = dr.Rows[0][11].ToString();

                    byte[]       imgData = (byte[])dr.Rows[0][8];
                    MemoryStream ms      = new MemoryStream();
                    ms.Write(imgData, 0, imgData.Length);
                    Bitmap bmp = new Bitmap(ms, false);
                    pic_desc.Image = bmp;
                    ms.Dispose();
                }
                else
                {
                    MessageBox.Show("No data found");
                }
            }
        }
コード例 #14
0
ファイル: BugBO.cs プロジェクト: jcpantunes/csharp
 public BugBO(string tipo)
 {
     bugDAO = new BugDAO(tipo);
 }
コード例 #15
0
ファイル: Dashboard.cs プロジェクト: thapapradeep/Bug-Tracker
        private void button2_Click(object sender, EventArgs e)
        {
            String class_name  = txt_class.Text;
            String method      = txt_method.Text;
            String line        = txt_line.Text;
            int    linee       = int.Parse(line);
            String path        = txt_path.Text;
            String symptom     = txt_sym.Text;
            String cause       = txt_cause.Text;
            String img_desc    = txt_name.Text;
            String code_block  = FastColour.Text;
            String source_link = txt_link.Text;

            if (String.IsNullOrEmpty(class_name))
            {
                MessageBox.Show("Please Provide Valid Information");
            }
            else if (String.IsNullOrEmpty(method))
            {
                MessageBox.Show("Please Provide Valid mathod name");
            }
            else if (String.IsNullOrEmpty(symptom))
            {
                MessageBox.Show("Please Provide Valid Symptom");
            }
            else if (String.IsNullOrEmpty(cause))
            {
                MessageBox.Show("Please Provide Valid Cause");
            }
            else if (String.IsNullOrEmpty(path))
            {
                MessageBox.Show("Please Provide Valid Path");
            }
            else if (String.IsNullOrEmpty(img_desc))
            {
                MessageBox.Show("Please Provide Valid Image Description");
            }
            else if (program_id == 0)
            {
                MessageBox.Show("Please Select program from Table");
            }
            else if (String.IsNullOrEmpty(source_link))
            {
                MessageBox.Show("Please Provide Valid Source Link");
            }
            else if (String.IsNullOrEmpty(code_block))
            {
                MessageBox.Show("Please Provide Error Code");
            }

            else
            {
                Bug bug = new Bug()
                {
                    program     = program_id,
                    class_name  = class_name,
                    method_name = method,
                    line_number = linee,
                    found_by    = id
                };
                BugDAO bu = new BugDAO();
                bug_id = bu.Insert(bug);
                Console.WriteLine(bug_id);

                BugDetails bugd = new BugDetails()
                {
                    bug_id      = bug_id,
                    image       = imgdata,
                    symptom     = symptom,
                    cause       = cause,
                    image_name  = img_desc,
                    code_block  = code_block,
                    source_link = source_link
                };
                BugDetailsDAO db = new BugDetailsDAO();

                int done = db.Insert(bugd);
                if (done != 0 && bug_id != 0)
                {
                    MessageBox.Show("inserted");
                    ClearFields();
                }
            }
        }
コード例 #16
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            //bug
            Bug bug = new Bug
            {
                BugId        = bugId,
                ProjectName  = label1.Text,
                ClassName    = textBox2.Text,
                MethodName   = textBox3.Text,
                StartLine    = Convert.ToInt16(textBox4.Text),
                EndLine      = Convert.ToInt16(textBox5.Text),
                ProgrammerId = Login.userId,
                Status       = "0"
            };

            try
            {
                BugDAO bugDao = new BugDAO();
                bugDao.Update(bug);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //image


            if (!string.IsNullOrEmpty(ImageName))
            {
                string appPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\code_image\";
                Bug_Tracker.Model.Image image = new Bug_Tracker.Model.Image
                {
                    ImageId   = imageId,
                    ImagePath = "code_image",
                    ImageName = ImageName,
                    BugId     = bug.BugId
                };

                try
                {
                    ImageDAO codeDao = new ImageDAO();
                    codeDao.Update(image);

                    File.Delete("code_image/" + currentImageName);
                    File.Copy(imageName, appPath + ImageName);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////code
            string c = fastColoredTextBox1.Text;

            //Code code = new Code
            //{
            //    CodeId = codeId,
            //    CodeFilePath = "code",
            //    CodeFileName = codeFileName,
            //    ProgrammingLanguage = programminLanguage,
            //    BugId = bug.BugId
            //};

            try
            {
                string path = @"code/" + codeFileName + ".txt";
                using (StreamWriter sw = File.CreateText(path))
                {
                    sw.WriteLine(c);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            MessageBox.Show("Updated");
        }
コード例 #17
0
        private void button1_Click(object sender, EventArgs e)
        {
            //bug
            BugViewModel bug = new BugViewModel
            {
                ProjectName  = textBox1.Text,
                ClassName    = textBox2.Text,
                MethodName   = textBox3.Text,
                StartLine    = Convert.ToInt16(textBox4.Text),
                EndLine      = Convert.ToInt16(textBox5.Text),
                ProgrammerId = Login.userId
            };

            try
            {
                BugDAO bugDao = new BugDAO();
                bugDao.Insert(bug);
            } catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            //image


            string appPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\code_image\";

            Bug_Tracker.Model.PictureViewModel image = new Bug_Tracker.Model.PictureViewModel
            {
                ImagePath = "code_image",
                ImageName = imageName,
                BugId     = bug.BugId
            };

            try
            {
                ImageDAO codeDao = new ImageDAO();
                codeDao.Insert(image);

                File.Copy(imageName, appPath + ImageName);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////code
            string c            = fastColoredTextBox1.Text;
            string codeFileName = DateTime.Now.Second.ToString();

            CodeViewModel code = new CodeViewModel
            {
                CodeFilePath        = "code",
                CodeFileName        = codeFileName,
                ProgrammingLanguage = programminLanguage,
                BugId = bug.BugId
            };

            try
            {
                CodeDAO codeDao = new CodeDAO();
                codeDao.Insert(code);

                string path = "code/" + codeFileName + ".txt";
                if (!File.Exists(path))
                {
                    // Create a file to write to.
                    using (StreamWriter sw = File.CreateText(path))
                    {
                        sw.WriteLine(c);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }


            //Bug bug = new Bug { BugId = }
        }
コード例 #18
0
        private void UpdateBug_Load_1(object sender, EventArgs e)
        {
            BugDAO bugDAO = new BugDAO();

            bug = bugDAO.GetById(Program.bugId);
            this.StartPosition = FormStartPosition.CenterScreen;
            //this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;

            if (disableButtons)
            {
                textBox2.Enabled = false;
                textBox3.Enabled = false;
                textBox4.Enabled = false;
                textBox5.Enabled = false;
                button2.Hide();
                button3.Hide();
                btnUpdate.Hide();
                button5.Show();
            }
            else
            {
                button5.Show();
            }



            //binding value to related labels and textbox
            label1.Text        = bug.ProjectName;
            textBox2.Text      = bug.ClassName;
            textBox3.Text      = bug.MethodName;
            textBox4.Text      = bug.StartLine.ToString();
            textBox5.Text      = bug.EndLine.ToString();
            programminLanguage = bug.Codes.ProgrammingLanguage;
            currentImageName   = bug.Images.ImageName;
            codeFileName       = bug.Codes.CodeFileName;
            //assiging related table's id
            bugId           = bug.BugId;
            codeId          = bug.Codes.CodeId;
            imageId         = bug.Images.ImageId;
            linkLabel1.Text = bug.SourceControl.Link;

            /*
             * Open the file to read from.
             * reading text from code file
             */
            string path = bug.Codes.CodeFilePath + "/" + bug.Codes.CodeFileName + ".txt";

            using (StreamReader sr = File.OpenText(path))
            {
                string s = "";
                while ((s = sr.ReadLine()) != null)
                {
                    fastColoredTextBox1.Text = fastColoredTextBox1.Text + Environment.NewLine + s;
                }
            }

            //assigning programming language for text box
            string programmingLanguage = bug.Codes.ProgrammingLanguage;

            if (programmingLanguage == "CSharp")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.CSharp;
            }
            else if (programmingLanguage == "HTML")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.HTML;
            }
            else if (programmingLanguage == "JavaScript")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.JS;
            }
            else if (programmingLanguage == "Lua")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.Lua;
            }
            else if (programmingLanguage == "PHP")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.PHP;
            }
            else if (programmingLanguage == "SQL")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.SQL;
            }
            else if (programmingLanguage == "VB")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.VB;
            }
            else if (programmingLanguage == "XML")
            {
                fastColoredTextBox1.Language = FastColoredTextBoxNS.Language.XML;
            }

            if (bug.Images.ImageName != "")
            {
                pictureBox1.Image    = new Bitmap(Path.Combine(bug.Images.ImagePath + "/", bug.Images.ImageName));
                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            }
        }
コード例 #19
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(comboBox1.SelectedItem.ToString()) || string.IsNullOrEmpty(textBox2.Text) || string.IsNullOrEmpty(textBox3.Text) || string.IsNullOrEmpty(textBox4.Text) || string.IsNullOrEmpty(textBox5.Text) || string.IsNullOrEmpty(textBox1.Text) || string.IsNullOrEmpty(textBox6.Text) || string.IsNullOrEmpty(textBox7.Text))
            {
                MessageBox.Show("You must add all project information");
            }
            else if (string.IsNullOrEmpty(fastColoredTextBox1.Text))
            {
                MessageBox.Show("Code field cann't be null");
            }
            else
            {
                //bug
                Bug bug = new Bug
                {
                    ProjectName  = comboBox1.SelectedItem.ToString(),
                    ClassName    = textBox2.Text,
                    MethodName   = textBox3.Text,
                    StartLine    = Convert.ToInt16(textBox4.Text),
                    EndLine      = Convert.ToInt16(textBox5.Text),
                    ProgrammerId = Login.userId,
                    Status       = "0"
                };

                try
                {
                    BugDAO bugDao = new BugDAO();
                    bugDao.Insert(bug);
                    inserted = true;
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                //image


                if (!string.IsNullOrEmpty(imageName))
                {
                    string appPath = Path.GetDirectoryName(Application.ExecutablePath) + @"\code_image\";
                    Bug_Tracker.Model.Image image = new Bug_Tracker.Model.Image
                    {
                        ImagePath = "code_image",
                        ImageName = ImageName,
                        BugId     = bug.BugId
                    };

                    try
                    {
                        ImageDAO codeDao = new ImageDAO();
                        codeDao.Insert(image);

                        File.Copy(imageName, appPath + ImageName);

                        inserted1 = true;
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }

                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                ////code
                string c            = fastColoredTextBox1.Text;
                string codeFileName = DateTime.Now.Second.ToString();

                Code code = new Code
                {
                    CodeFilePath        = "code",
                    CodeFileName        = codeFileName,
                    ProgrammingLanguage = programminLanguage,
                    BugId = bug.BugId
                };

                try
                {
                    CodeDAO codeDao = new CodeDAO();
                    codeDao.Insert(code);

                    string path = "code/" + codeFileName + ".txt";
                    if (!File.Exists(path))
                    {
                        // Create a file to write to.
                        using (StreamWriter sw = File.CreateText(path))
                        {
                            sw.WriteLine(c);
                        }
                    }

                    inserted2 = true;
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }


                ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                ////Link

                SourceControl sourceControl = new SourceControl
                {
                    Link      = textBox1.Text,
                    StartLine = Convert.ToInt32(textBox6.Text),
                    EndLine   = Convert.ToInt32(textBox7.Text),
                    BugId     = bug.BugId
                };

                SourceControlDAO sourceControlDAO = new SourceControlDAO();

                try
                {
                    sourceControlDAO.Insert(sourceControl);
                    inserted3 = true;
                } catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }


                if (inserted && inserted1 && inserted2)
                {
                    MessageBox.Show("Added");
                }
                else
                {
                    MessageBox.Show("Unable to add");
                }
            }
        }
コード例 #20
0
        private void executarAcao(DataGrid grid, Label lbl, int opcao, bool inteiro)
        {
            if (validarExibicaoTabela())
            {
                DataTable          tabela           = new DataTable();
                List <Funcionario> listaFuncionario = new List <Funcionario>();
                List <string>      listaColunas     = new List <string>();
                prepararTabela(tabela, listaFuncionario, listaColunas, inteiro);

                decimal mediaGeral = 0;
                foreach (Funcionario func in listaFuncionario)
                {
                    object[] linha = new object[listaColunas.Count + 2]; // +2 por causa das colunas nome e media
                    linha[0] = func.Nome;
                    decimal media = 0;
                    for (int i = 0; i < listaColunas.Count; i++)
                    {
                        if (opcao == OpcaoIndicador.NUM_TAREFA_POR_SPRINT)
                        {
                            TarefaBO tBO = new TarefaBO();
                            linha[i + 1] = tBO.RecuperarQtdeItensPorSprintPorResponsavel(listaColunas[i], func.Codigo);
                        }
                        else if (opcao == OpcaoIndicador.NUM_RELATO_CORRIGIDO_POR_SPRINT)
                        {
                            BugDAO rDAO = new BugDAO(Constantes.RELATO);
                            linha[i + 1] = rDAO.recuperarQtdeItensPorSprintPorResponsavel(listaColunas[i], func.Codigo);
                        }
                        else if (opcao == OpcaoIndicador.NUM_ITEM_POR_SPRINT)
                        {
                            ItemBacklogDAO ibDAO = new ItemBacklogDAO();
                            linha[i + 1] = ibDAO.recuperarQtdeItensBacklogPorSprintPorResponsavel(listaColunas[i], func.Codigo);
                        }
                        else if (opcao == OpcaoIndicador.COMPLEXIDADE_ITEM_POR_SPRINT)
                        {
                            // =SOMARPRODUTO(($Backlog.$E$2:$E$200=B$2)*($Backlog.$R$2:$R$200>0)*($Backlog.$I$2:$I$200))/SOMARPRODUTO(($Backlog.$E$2:$E$200=B$2)*($Backlog.$R$2:$R$200>0))
                            // E = Planejado Para
                            // R = Somatorio numero tarefas do funcionario no item de backlog
                            // I = Complexidade do Item

                            ItemBacklogDAO ibDAO = new ItemBacklogDAO();
                            linha[i + 1] = ibDAO.recuperarComplexidadeItensPorSprintPorResponsavel(listaColunas[i], func.Codigo);
                        }
                        else if (opcao == OpcaoIndicador.NUM_DEFEITO_CORRIGIDO_POR_SPRINT)
                        {
                            // =SOMARPRODUTO(($Backlog.$E$2:$E$200=B$2)*($Backlog.$R$2:$R$200>0)*($Backlog.$M$2:$M$200))/SOMARPRODUTO(($Backlog.$E$2:$E$200=B$2)*($Backlog.$R$2:$R$200>0))
                            // M = Quantidade de defeitos do Item

                            BugDAO dDAO = new BugDAO(Constantes.DEFEITO);
                            linha[i + 1] = dDAO.recuperarQtdeItensPorSprintPorResponsavel(listaColunas[i], func.Codigo);
                        }
                        else if (opcao == OpcaoIndicador.NUM_DEFEITO_CRIADO_POR_SPRINT)
                        {
                            BugBO dBO = new BugBO(Constantes.DEFEITO);
                            linha[i + 1] = dBO.recuperarQtdeItensPorSprintPorCriador(listaColunas[i], func.Nome);
                        }
                        //else if (opcao == OpcaoIndicador.NUM_DEFEITO_POR_ITEM_BACKLOG)
                        //{
                        //    // =SOMARPRODUTO(($Backlog.$E$2:$E$200=B$2)*($Backlog.$R$2:$R$200>0)*($Backlog.$M$2:$M$200))/SOMARPRODUTO(($Backlog.$E$2:$E$200=B$2)*($Backlog.$R$2:$R$200>0))
                        //    // M = Quantidade de defeitos do Item

                        //    BugDAO dDAO = new BugDAO(Constantes.DEFEITO);
                        //    linha[i + 1] = dDAO.recuperarMediaDefeitosPorSprintPorResponsavel(listaColunas[i], func.Codigo);
                        //}
                        //else if (opcao == OpcaoIndicador.NUM_TAREFA_ESTIMATIVA_MAIOR_TEMPO_GASTO)
                        //{
                        //    TarefaDAO tDAO = new TarefaDAO();
                        //    linha[i + 1] = tDAO.recuperarQtdeTarefasPorSprintTempoGastoMaiorEstimativa(listaColunas[i], func.Codigo);
                        //}
                        //else if (opcao == OpcaoIndicador.NUM_TAREFA_TEMPO_GASTO_MAIOR_24)
                        //{
                        //    TarefaDAO tDAO = new TarefaDAO();
                        //    linha[i + 1] = tDAO.recuperarQtdeTarefasTempoGastoMaior24(listaColunas[i], func.Codigo);
                        //}
                        else
                        {
                            linha[i + 1] = i;
                        }
                        media += Convert.ToDecimal(linha[i + 1]);
                    }
                    mediaGeral += Decimal.Round((media / listaColunas.Count), 2);
                    linha[listaColunas.Count + 1] = Decimal.Round((media / listaColunas.Count), 2);
                    tabela.Rows.Add(linha);
                }
                lbl.Content = Decimal.Round((mediaGeral / tabela.Rows.Count), 2);;
                preencherGrid(grid, tabela);
            }
        }