Ejemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     cn.Connect();
     cn.ResetDiem();
     dt             = GetData();
     dgv.DataSource = dt;
     cn.Disconnect();
 }
Ejemplo n.º 2
0
 private void FormXemdiem_Load(object sender, EventArgs e)
 {
     cn = new Connectsql();
     cn.Connect();
     dt             = GetData();
     dgv.DataSource = dt;
     cn.Disconnect();
 }
Ejemplo n.º 3
0
 public void StartGame()
 {
     diem = 0;
     cn.Connect();
     if (cn.ImportQA(cn.mysql, "SELECT *FROM Question") != -1)
     {
         soMang = 5;
         AddPic();
     }
     else
     {
         MessageBox.Show("Kết nối bị lỗi", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            string name = txtname.Text.ToString();

            if (name != "")
            {
                cn.Connect();
                name = chuanhoa.btchuanhoa(name);
                cn.ImportPoint(name, diem);
                cn.Disconnect();
                this.Close();
            }
            else
            {
                MessageBox.Show("Bạn Chưa Nhập Tên!");
            }
        }