Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Form17 f17 = new Form17();

            f17.Show();
            this.Hide();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            connection.Open();
            OleDbCommand command = new OleDbCommand();

            command.Connection = connection;
            int run = 0, wicket = 0, over = 0;

            int.TryParse(txt_run.Text, out run);
            int.TryParse(txt_over.Text, out over);
            int.TryParse(txt_wicket.Text, out wicket);
            string query;

            if ((txt_bat.Text == txt_team1.Text && txt_bowl.Text == txt_team2.Text) || (txt_bat.Text == txt_team2.Text && txt_bowl.Text == txt_team1.Text))
            {
                query = "update Live_score set Team1='" + txt_team1.Text + "' ,Team2='" + txt_team2.Text + "' ,Batting_team='" + txt_bat.Text + "' ,Bowling_team='" + txt_bowl.Text + "' ,Runn=" + run + " ,Overr=" + over + " ,Wickett=" + wicket + " where MatchNo>0";
                command.CommandText = query;
                command.ExecuteNonQuery();

                query = "update Ticket set Availibilityy='No' where MatchNo=" + MatchNo + "";
                command.CommandText = query;
                command.ExecuteNonQuery();
            }
            else
            {
                MessageBox.Show("Please enter the teams' names correctly");
            }

            connection.Close();

            this.Hide();
            Form17 f17 = new Form17(username1, MatchNo);

            f17.ShowDialog();
        }
Example #3
0
        private void 添加成绩ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            Form17 f4 = new Form17();

            f4.ShowDialog();
            this.Visible = true;
        }
 private void label10_Click(object sender, EventArgs e)
 {
     //If there is no Form 17 instance
     if (f17 == null)
     {
         //Instantiate Form 17
         f17 = new Form17();
     }
     //Show the new Form 17 instance
     f17.Show();
     //Set Form 17's Form 6 variable as this instance
     f17.f6 = this;
     //Set Form 17's Form 7 variable as null
     f17.f7 = null;
     //Hide this form
     this.Hide();
 }
        private void label9_Click(object sender, EventArgs e)
        {
            Form17 f17 = new Form17();

            f17.Show();
        }
Example #6
0
        private void компанияToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form f10 = new Form17();

            f10.Show();
        }
 private void btn_live_Click(object sender, EventArgs e)
 {
     this.Hide();
     Form17 f17 = new Form17(username1,matchno);
     f17.ShowDialog();
 }