private void button2_Click(object sender, EventArgs e) { cn.Connect(); cn.ResetDiem(); dt = GetData(); dgv.DataSource = dt; cn.Disconnect(); }
private void FormXemdiem_Load(object sender, EventArgs e) { cn = new Connectsql(); cn.Connect(); dt = GetData(); dgv.DataSource = dt; cn.Disconnect(); }
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); } }
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!"); } }