Exemplo n.º 1
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Form10 form = new Form10();

            form.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void button6_Click(object sender, EventArgs e)
        {
            Form10 form10 = new Form10();

            form10.Show();
            Hide();
        }
Exemplo n.º 3
0
        private void thốngKêToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form9  f = new Form9();
            string a = "";
            string b = "";

            while (f.ShowDialog() == DialogResult.OK)
            {
                if (f.getTB1() == "" || f.getTB2() == "")
                {
                    MessageBox.Show("Chưa điền đủ thông tin", "Title", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    continue;
                }
                a = f.getTB1();
                b = f.getTB2();
                f.Close();
                break;
            }

            flightinfo(obj, a, b);
            string str = "";

            using (StreamReader sr = File.OpenText("output2.txt"))
            {
                str = sr.ReadLine();
            }
            if (str == "not")
            {
                MessageBox.Show("Không có chuyến bay phù hợp", "Title", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            Form10 ff = new Form10(a, b, str);

            ff.Show();
        }
Exemplo n.º 4
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            i += 1;
            if (i % 10 == 0)
            {
                string         sql       = "server= 202.120.167.146;database=crack;uid=sa;pwd=cps640818~";
                SqlConnection  myconn    = new SqlConnection(sql);
                SqlDataAdapter myadapter = new SqlDataAdapter("select  id,pic_num,count(crack_num) from crack_info where id = '" + Class1.id + "' group by id,pic_num ", myconn);
                DataTable      mytable   = new DataTable();
                myadapter.Fill(mytable);
                int a = mytable.Rows.Count;


                SqlDataAdapter myadapter2 = new SqlDataAdapter("select pic_num from pic where id='" + Class1.id + "'  ", myconn);
                DataTable      mytable2   = new DataTable();
                myadapter2.Fill(mytable2);

                int count = mytable2.Rows.Count;

                if (a == count)
                {
                    Form10 f10 = new Form10();
                    f10.Show();
                    timer2.Enabled = true;
                }
            }
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            OracleConnection con = new OracleConnection();

            con.ConnectionString = constr;
            con.Open();
            string            Username = textBox1.Text;
            string            password = textBox2.Text;
            OracleCommand     cmd      = new OracleCommand("select login, password from VER3.USERS where login='******' and password='******'", con);
            OracleDataAdapter da       = new OracleDataAdapter(cmd);
            DataTable         dt       = new DataTable();

            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                this.Hide();
                Form10 ss = new Form10();
                con.Close();
                ss.Show();
            }
            else
            {
                MessageBox.Show("Wrong login or password");
                con.Close();
            }
        }
Exemplo n.º 6
0
        private void pictureBox4_Click(object sender, EventArgs e)
        {
            Form10 f10 = new Form10();

            f10.Show();
            timer1.Enabled = true;
        }
Exemplo n.º 7
0
        private void button5_Click(object sender, EventArgs e)
        {
            Form10 myform = new Form10();   //新窗口

            myform.Show();
            this.Close(); //关闭
        }
Exemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            search_word.strsearch = textBox1.Text;
            if (search_word.strsearch == "")
            {
                MessageBox.Show("Please enter something to search for.");
            }
            else
            {
                DB_Connect();
                comm             = new OracleCommand();
                comm.Connection  = conn;
                comm.CommandType = CommandType.Text;
                comm.CommandText = "select count(*) as counter from item1 where type like '%" + search_word.strsearch + "%'";
                ds = new DataSet();
                da = new OracleDataAdapter(comm.CommandText, conn);
                da.Fill(ds, "Tbl_participated");
                dt = ds.Tables["Tbl_participated"];
                dr = dt.Rows[0];
                conn.Close();

                if (int.Parse(dr["counter"].ToString()) > 1)
                {
                    Form10 form10 = new Form10();
                    this.Close();
                    form10.Show();
                }
                else
                {
                    MessageBox.Show("No items match your search. Try again!");
                }
            }
        }
Exemplo n.º 9
0
        private void pictureBox5_Click(object sender, EventArgs e)
        {
            Class1.index = 0;
            Form10 f10 = new Form10();

            f10.Show();
            timer1.Enabled = true;
        }
Exemplo n.º 10
0
 private void pictureBox10_Click(object sender, EventArgs e)
 {
     if (Class1.min == Class1.max && Class1.min == 0)
     {
         MessageBox.Show("no images analyzed!");
     }
     else
     {
         Form10 f10 = new Form10();
         f10.Show();
         timer1.Enabled = true;
     }
 }
Exemplo n.º 11
0
 private void button1_Click(object sender, EventArgs e) //ย้อนกลับหน้าแรก
 {
     if (Program.checkstatus == "ADMIN")                //เช็คระบบadmin
     {
         Form2 a = new Form2();
         this.Hide();
         a.Show();
     }
     else
     {
         Form10 a = new Form10();
         this.Hide();
         a.Show();
     }
 }
Exemplo n.º 12
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (radioButton3.Checked == true)
            {
                d = 1;
            }
            else
            {
                d = 2;
            }
            Form10 form = new Form10();

            form.Show();
            this.Hide();
        }
Exemplo n.º 13
0
        private void login_press()
        {
            MySqlConnection conn = databaseConnection();

            conn.Open();
            MySqlCommand cmd;

            cmd             = conn.CreateCommand();
            cmd.CommandText = $"SELECT * FROM members WHERE member_user=\"{user.Text}\" AND member_password=\"{pass.Text}\"";
            MySqlDataReader rowss = cmd.ExecuteReader();

            if (rowss.HasRows)
            {
                rowss.Read();
                //เลือกข้อมูลจากตารางมาแสดง
                Program.checkname     = rowss.GetString("member_name");
                Program.checklastname = rowss.GetString("member_lastname");
                Program.checkstatus   = rowss.GetString("member_status");
                if (Program.checkstatus == "ADMIN")//เช็คระบบadmin
                {
                    MessageBox.Show("เข้าสู่ระบบ Admin แล้ว ", "Alert");
                    // MessageBox.Show($"เข้าสู่ระบบแล้ว \"{Program.checkname}\"", "Alert",MessageBoxButtons.OK,MessageBoxIcon.Information);//โชว์ชื่อหน้าล็อคอิน
                    Form2 a = new Form2();
                    this.Hide();
                    a.Show();
                }
                else
                {
                    MessageBox.Show("เข้าสู่ระบบแล้ว ", "Alert");
                    Form10 a = new Form10();
                    this.Hide();
                    a.Show();
                }
            }
            else
            {
                MessageBox.Show("ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง ", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                user.Text = ""; //คำสั่งเคลียร์
                pass.Clear();   //คำสั่งเคลียร์
                user.Focus();   //คำสั่งเคลียร์
            }
        }
Exemplo n.º 14
0
        private void Btn_Login_Click(object sender, EventArgs e)
        {
            MySqlConnection conn = databaseConnection();

            conn.Open();
            MySqlCommand cmd;

            cmd             = conn.CreateCommand();
            cmd.CommandText = $"SELECT * FROM members WHERE member_user=\"{user.Text}\" AND member_password=\"{pass.Text}\"";
            MySqlDataReader rowss = cmd.ExecuteReader();

            rowss.Read();
            if (rowss.HasRows)
            {
                Program.checkstatus = rowss.GetString("member_status");
                if (Program.checkstatus == "ADMIN")//เช็คระบบadmin
                {
                    MessageBox.Show("เข้าสู่ระบบ Admin แล้ว ", "Alert");
                    Form2 a = new Form2();
                    this.Hide();
                    a.Show();
                }
                else
                {
                    MessageBox.Show("เข้าสู่ระบบแล้ว ", "Alert");
                    Form10 a = new Form10();
                    this.Hide();
                    a.Show();
                }
            }
            else
            {
                MessageBox.Show("ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง ", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                user.Text = ""; //คำสั่งเคลียร์
                pass.Clear();   //คำสั่งเคลียร์
                user.Focus();   //คำสั่งเคลียร์
            }
            conn.Close();
        }
Exemplo n.º 15
0
Arquivo: 父窗口.cs Projeto: 77XX/X
 private void button1_Click(object sender, EventArgs e)
 {
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 0)
     {
         Form2 form2 = new Form2();
         this.Hide();
         form2.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 1)
     {
         Form3 form3 = new Form3();
         this.Hide();
         form3.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 2)
     {
         Form4 form4 = new Form4();
         this.Hide();
         form4.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 3)
     {
         Form5 form5 = new Form5();
         this.Hide();
         form5.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 4)
     {
         Form6 form6 = new Form6();
         this.Hide();
         form6.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 5)
     {
         Form7 form7 = new Form7();
         this.Hide();
         form7.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 6)
     {
         Form8 form8 = new Form8();
         this.Hide();
         form8.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 7)
     {
         Form9 form9 = new Form9();
         this.Hide();
         form9.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 8)
     {
         Form10 form10 = new Form10();
         this.Hide();
         form10.Show();
     }
     if (sexual.SelectedIndex == 0 && st.SelectedIndex == 9)
     {
         Form11 form11 = new Form11();
         this.Hide();
         form11.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 0)
     {
         Form12 form12 = new Form12();
         this.Hide();
         form12.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 1)
     {
         Form13 form13 = new Form13();
         this.Hide();
         form13.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 2)
     {
         Form14 form14 = new Form14();
         this.Hide();
         form14.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 3)
     {
         Form15 form15 = new Form15();
         this.Hide();
         form15.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 4)
     {
         Form16 form16 = new Form16();
         this.Hide();
         form16.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 5)
     {
         Form17 form17 = new Form17();
         this.Hide();
         form17.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 6)
     {
         Form18 form18 = new Form18();
         this.Hide();
         form18.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 7)
     {
         Form19 form19 = new Form19();
         this.Hide();
         form19.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 8)
     {
         Form20 form20 = new Form20();
         this.Hide();
         form20.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 9)
     {
         Form21 form21 = new Form21();
         this.Hide();
         form21.Show();
     }
     if (sexual.SelectedIndex == 1 && st.SelectedIndex == 10)
     {
         Form22 form22 = new Form22();
         this.Hide();
         form22.Show();
     }
 }
Exemplo n.º 16
0
        private void Editlabel_Click(object sender, EventArgs e)
        {
            Form10 form = new Form10();

            form.Show();
        }