Beispiel #1
0
 private void bugadd_Click(object sender, EventArgs e)
 {
     // Form3 formDig1 = new Form3();
     Form3 formDig1 = new Form3(textBox1.Text);
     formDig1.Show();
     Close();
 }
Beispiel #2
0
        private void test_CaseDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (MessageBox.Show("Do you want to add a bug to the existing Test Case?", "Bug Hunter", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                Form3 formDig1 = new Form3(textBox2.Text);
               // Form3 formDig1 = new Form3();
                formDig1.Show();
            }
            else
            if (e.RowIndex >= 0)
            {
                DataGridViewRow row = this.test_CaseDataGridView.Rows[e.RowIndex];
                id = row.Cells["dataGridViewTextBoxColumn1"].Value.ToString();
               // MessageBox.Show("id is " + id);
                textBox1.Text = id;
                //    DataGridViewRow row = (DataGridViewRow)sender;
                this.test_CaseTableAdapter.FillBy(this._BugHunter1_1DataSet.Test_Case,15 );

                Form5 formDig1 = new Form5(textBox1.Text);

                //this.test_CaseTableAdapter.Fill(this._BugHunter1_1DataSet.Test_Case);
                formDig1.Show();
                Close();
            }
        }
Beispiel #3
0
        private void bugDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow row = this.bugDataGridView.Rows[e.RowIndex];
            ids = row.Cells["dataGridViewTextBoxColumn1"].Value.ToString();
            //MessageBox.Show("id is " + ids);
            textBox1.Text = ids;
            //    DataGridViewRow row = (DataGridViewRow)sender;
            this.bugTableAdapter.FillBy(this._BugHunter1_1DataSet.Bug);

            Form3 formDig1 = new Form3(textBox1.Text);
              //  Form3 formDig1 = new Form3();
            //this.test_CaseTableAdapter.Fill(this._BugHunter1_1DataSet.Test_Case);
            formDig1.Show();
            Close();
        }
Beispiel #4
0
        private void bugrepbutton2_Click(object sender, EventArgs e)
        {
            // MessageBox.Show("case" + testCaseIDTextBox.Text);
            connect.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\visual studio 2010\Projects\TestingApplication\TestingApplication\BugHunter1.1.accdb";
            String pstartdate = planStartDateDateTimePicker.Text;
            String penddate = planEndDateDateTimePicker.Text;
            String astartdate = actualStartDateDateTimePicker.Text;
            String aenddate = actualEndDateDateTimePicker.Text;
            //int caseid;
            String projectid = projectIDComboBox.Text ;
            String sprojectid = subProjectIDComboBox.Text;
            String suiteid = testSuiteIDComboBox.Text;
            String testerid = testerIDComboBox.Text;
            String status = testStatusComboBox.Text;
            String desc = testCaseDescriptionTextBox.Text;
            String phours = planHoursTextBox.Text;
            String lhours = labourHoursTextBox.Text;
            String casestep = testCaseStepsTextBox.Text;
            String userreq = userRequirementsTextBox.Text;
            String comments = commentsTextBox.Text;

            connect.Open();

            OleDbCommand cmd = new OleDbCommand("INSERT INTO TEST_CASE(TESTCASEDESCRIPTION,TESTCASESTEPS,USERREQUIREMENTS,TESTSTATUS,COMMENTS,PLANHOURS,LABOURHOURS,PROJECTID,TESTERID,SUBPROJECTID,TESTSUITEID,planstartdate,planenddate,actualstartdate,actualenddate )" + "values(@desc,@casestep,@userreq,@status,@comments,@phours,@lhours,@projectid,@testerid,@sprojectid,@suiteid,@pstartdate,@penddate,@astartdate,@aenddate )", connect);

            if (connect.State == ConnectionState.Open)
            {
                cmd.Parameters.Add("@desc", OleDbType.Char, 20).Value = desc;
                cmd.Parameters.Add("@casestep", OleDbType.Char, 20).Value = casestep;
                cmd.Parameters.Add("@userreq", OleDbType.Char, 20).Value = userreq;
                cmd.Parameters.Add("@status", OleDbType.Char, 20).Value = status;
                cmd.Parameters.Add("@comments", OleDbType.Char, 20).Value = comments;
                cmd.Parameters.Add("@phours", OleDbType.Char, 20).Value = phours;
                cmd.Parameters.Add("@lhours", OleDbType.Char, 20).Value = lhours;
                cmd.Parameters.Add("@projectid", OleDbType.Char, 20).Value = projectid;
                cmd.Parameters.Add("@testerid", OleDbType.Char, 20).Value = testerid;
                cmd.Parameters.Add("@sprojectid", OleDbType.Char, 20).Value = sprojectid;
                cmd.Parameters.Add("@suiteid", OleDbType.Char, 20).Value = suiteid;
                cmd.Parameters.Add("@pstartdate", OleDbType.Char, 20).Value = pstartdate;
                cmd.Parameters.Add("@penddate", OleDbType.Char, 20).Value = penddate;
                cmd.Parameters.Add("@astartdate", OleDbType.Char, 20).Value = astartdate;
                cmd.Parameters.Add("@aenddate", OleDbType.Char, 20).Value = aenddate;

                cmd.ExecuteNonQuery();
                MessageBox.Show("TEST CASE ADDED");
                        connect.Close();
                        try
                        {
                             cmd.ExecuteNonQuery();
                            MessageBox.Show("TEST CASE ADDED");
                            connect.Close();

                        }
                    catch (Exception expe)
                        {
                          //  MessageBox.Show(expe.Source);
                            connect.Close();
                        }
                    }
              else
                    {
                        MessageBox.Show(" CONNECTION FAILED");
                    }

            Form3 formDig1 = new Form3(textBox1.Text);
            //Form3 formDig1 = new Form3();
            formDig1.Show();
            Close();
            // testfrom1 formDig1 = new testfrom1();
            //formDig1.Show();
            //Close();
        }