コード例 #1
0
        private void backbutton_Click(object sender, EventArgs e)
        {
            testfrom1 formDig1 = new testfrom1();

            formDig1.Show();
            Hide();
        }
コード例 #2
0
        private void loginbutton_Click(object sender, EventArgs e)
        {
            log = Usertext.Text;
            this.userTableAdapter.FillBy11(this._BugHunter1_1DataSet.User, @LoginID);
            //Form2 formDig1 = new Form2();
            //testfrom1 formDig1 = new testfrom1();
            //formDig1.Show();
            //Hide();
            // MessageBox.Show(log +"Ok"+ LoginID );

            if (Passtext.Text == loginPasswordTextBox.Text)
            {
                if (Passtext.Text == passchecktext.Text)
                {
                    MessageBox.Show("Enter Password");
                }
                else
                {
                    if (designationIDTextBox.Text == "developer")
                    {
                        //Form3 formDig1 = new Form3();
                        //Form3 formDig1 = new Form3(textBox1.Text);
                        Form2 formDig1 = new Form2();
                        formDig1.Show();
                        Hide();
                    }
                    else
                    if (designationIDTextBox.Text == "tester")
                    {
                        // Form5 formDig1 = new Form5(textBox1.Text);
                        testfrom1 formDig1 = new testfrom1();
                        formDig1.Show();
                        Hide();
                    }
                    else
                    {
                        Form6 formDig1 = new Form6();
                        formDig1.Show();
                        Hide();
                    }
                }
            }
            else
            {
                MessageBox.Show("Invalid User Name or Password");
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: thomknot/Bug-Hunter
        private void loginbutton_Click(object sender, EventArgs e)
        {
            log = Usertext.Text;
            this.userTableAdapter.FillBy11(this._BugHunter1_1DataSet.User, @LoginID);
            //Form2 formDig1 = new Form2();
            //testfrom1 formDig1 = new testfrom1();
            //formDig1.Show();
            //Hide();
               // MessageBox.Show(log +"Ok"+ LoginID );

            if (Passtext.Text == loginPasswordTextBox.Text)
            {
                if(Passtext.Text==passchecktext.Text)
                {
                    MessageBox.Show("Enter Password");
                }
                else
                {
                    if (designationIDTextBox.Text == "developer")
                    {
                        //Form3 formDig1 = new Form3();
                        //Form3 formDig1 = new Form3(textBox1.Text);
                          Form2 formDig1 = new Form2();
                        formDig1.Show();
                        Hide();
                    }
                    else
                        if (designationIDTextBox.Text == "tester")
                        {
                           // Form5 formDig1 = new Form5(textBox1.Text);
                            testfrom1 formDig1 = new testfrom1();
                            formDig1.Show();
                            Hide();
                        }
                        else
                        {
                            Form6 formDig1 = new Form6();
                            formDig1.Show();
                            Hide();
                        }
                }
            }
            else
            {
                MessageBox.Show("Invalid User Name or Password");
            }
        }
コード例 #4
0
        private void testcaseaddbutton_Click(object sender, EventArgs e)
        {
            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);
            //formDig1.Show();
            //Close();
            testfrom1 formDig1 = new testfrom1();

            formDig1.Show();
            Close();
        }
コード例 #5
0
ファイル: Form5.cs プロジェクト: thomknot/Bug-Hunter
 private void backbutton_Click(object sender, EventArgs e)
 {
     testfrom1 formDig1 = new testfrom1();
     formDig1.Show();
     Hide();
 }
コード例 #6
0
ファイル: Form5.cs プロジェクト: thomknot/Bug-Hunter
        private void testcaseaddbutton_Click(object sender, EventArgs e)
        {
            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);
            //formDig1.Show();
            //Close();
            testfrom1 formDig1 = new testfrom1();
            formDig1.Show();
            Close();
        }