Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form obj1;

            if (radioButton1.Checked)
            {
                this.Hide();
                obj1 = new insertseries();
                obj1.Show();
            }
            else if (radioButton4.Checked)
            {
                this.Hide();
                obj1 = new insertmovie();
                obj1.Show();
            }
            else
            {
                DialogResult d;
                d = MessageBox.Show("Select one from above.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (d == DialogResult.OK)
                {
                    Close();
                    obj1 = new insertmain();
                    obj1.Show();
                }
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (mName.Text == "" || mStudio.Text == "")
            {
                MessageBox.Show("Empty field", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                try
                {
                    DialogResult d;
                    d = MessageBox.Show("Record Entered successfully\nwould you like to Insert one more record?", "Success", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (d == DialogResult.Yes)
                    {
                        Close();
                        Form obj = new insertmovie();
                        obj.Show();
                    }
                    else
                    {
                        Close();
                        Form obj = new insertmain();
                        obj.Show();
                    }
                }

                catch
                {
                    MessageBox.Show("" + e.ToString(), "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (eno.Text == "" || etitle.Text == "" || elength.Text == "" || eSeries.Text == "")
            {
                MessageBox.Show("Empty field", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                try
                {
                    DialogResult d;
                    d = MessageBox.Show("Record Entered successfully\nwould you like to Insert one more record?", "Success", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (d == DialogResult.Yes)
                    {
                        Close();
                        Form obj1 = new episode();
                        obj1.Show();
                    }
                    else
                    {
                        Close();
                        Form obj1 = new insertmain();
                        obj1.Show();
                    }
                }

                catch
                {
                    MessageBox.Show("Error", "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (Sname.Text == "" || Network.Text == "" || Production.Text == "")
            {
                MessageBox.Show("Empty field", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                String connection = "Provider=OraOLEDB.Oracle;Data Source=localhost;User Id=SYSTEM;Password=system;OLEDB.NET=True";

                OleDbConnection obj1 = new OleDbConnection(connection);
                obj1.Open();
                String q1 = "insert into series values ('" + Sname.Text + "','" + Network.Text + "')";
                String q2 = "insert into pcompany values('" + Sname.Text + "','" + Production.Text + "')";

                try
                {
                    OleDbCommand cm1 = new OleDbCommand(q1, obj1);
                    OleDbCommand cm2 = new OleDbCommand(q2, obj1);
                    cm1.ExecuteNonQuery();
                    cm2.ExecuteNonQuery();
                    obj1.Close();
                    DialogResult d;
                    d = MessageBox.Show("Record Entered successfully\nwould you like to Insert episode?", "Success", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (d == DialogResult.Yes)
                    {
                        Close();
                        Form obj = new episode();
                        obj.Show();
                    }
                    if (d == DialogResult.No)
                    {
                        d = d = MessageBox.Show("would you like to Insert one more record?", "Nofification", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                        if (d == DialogResult.Yes)
                        {
                            Close();
                            Form obj = new insertseries();
                            obj.Show();
                        }
                        else
                        {
                            Close();
                            Form obj = new insertmain();
                            obj.Show();
                        }
                    }
                }

                catch
                {
                    MessageBox.Show("Error...", "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (aName.Text == "" || aNation.Text == "" || mCheck.Checked == false && sCheck.Checked == false)
     {
         MessageBox.Show("Empty field", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         try
         {
             if (mCheck.Checked == true)
             {
             }
             else if (sCheck.Checked == true)
             {
             }
             else
             {
             }
             DialogResult d;
             d = MessageBox.Show("Record Entered successfully\nwould you like to Insert one more record?", "Success", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
             if (d == DialogResult.Yes)
             {
                 Close();
                 Form obj1 = new insertactor();
                 obj1.Show();
             }
             else
             {
                 Close();
                 Form obj1 = new insertmain();
                 obj1.Show();
             }
         }
         catch
         {
             MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
 }
Ejemplo n.º 6
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         Form obj1 = new insertmain();
         this.Hide();
         obj1.Show();
     }
     else if (radioButton2.Checked)
     {
         Form obj2 = new updatemain();
         this.Hide();
         obj2.Show();
     }
     else if (radioButton3.Checked)
     {
         Form obj3 = new deletemain();
         this.Hide();
         obj3.Show();
     }
     else if (radioButton4.Checked)
     {
         Form obj4 = new joinmain();
         this.Hide();
         obj4.Show();
     }
     else
     {
         DialogResult d;
         d = MessageBox.Show("Select one from above.", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         if (d == DialogResult.OK)
         {
             Close();
             Form obj1 = new form2();
             obj1.Show();
         }
     }
 }