public void DeletePlayer() { System.Windows.Forms.UserControl usr = new usrTeamList(); string id = usrTeamList.Instance.tb_hsdb_mact.Text; // string CheckQuery = "SELECT * " + //"FROM CAUTHU WHERE MaDoi = '" + id + "' "; // DataTable dt = DataProvider.Instance.ExecuteQuery(CheckQuery); if (usrTeamList.Instance.tb_hsdb_mact.Text != "") { var resultDialog = MessageBox.Show("Bạn có chắc muốn xóa cầu thủ?", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (resultDialog == DialogResult.OK) { string DeleteQuery = "DELETE FROM CAUTHU WHERE MaCauThu = '" + id + "'"; int result = DataProvider.Instance.ExecuteNonQuery(DeleteQuery); if (result > 0) { MessageBox.Show("Cầu thủ đã bị xóa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }
public void DeleteGoalType() { System.Windows.Forms.UserControl usr = new usrTeamList(); string TenLoaiBan = usrRulesChange.Instance.tb_LoaiBan.Text; if (usrRulesChange.Instance.tb_LoaiBan.Text != "") { MessageBox.Show("Bạn có chắc sẽ xóa"); string DeleteQuery = "DELETE FROM LOAIBANTHANG WHERE LOAIBANTHANG= '" + TenLoaiBan + "'"; int result = DataProvider.Instance.ExecuteNonQuery(DeleteQuery); if (result > 0) { MessageBox.Show(" Loại bàn thắng đã bị xóa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
// cap nhat player public void UpdatePlayer() { System.Windows.Forms.UserControl usr = new usrTeamList(); string id = usrTeamList.Instance.tb_hsdb_mact.Text; string tencauthu = usrTeamList.Instance.tb_hsdb_tenct.Text; string ngaysinh = usrTeamList.Instance.dtp_cauthu_ngsinh.Value.ToString(); string loaiCT = usrTeamList.Instance.cb_hsdb_loaict.Text; string tgian = usrTeamList.Instance.tb_hsdb_tgiantd.Text; string thetrang = usrTeamList.Instance.tb_hsdb_thetrang.Text; // MessageBox.Show(id); string UpdateQuery = "UPDATE CAUTHU " + "SET TenCauThu = '" + tencauthu + "', NgaySinh = '" + ngaysinh + "', LoaiCauThu = '" + loaiCT + "', ThoiGianThiDau = '" + tgian + "',TinhTrang ='" + thetrang + "'" + " WHERE MaCauThu = '" + id + "'"; int result = DataProvider.Instance.ExecuteNonQuery(UpdateQuery); if (result > 0) { MessageBox.Show("Cầu thủ đã được cập nhật", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void DeleteGoal() { System.Windows.Forms.UserControl usr = new usrTeamList(); string MaBan = usrGoalDetail.Instance.tb_MaBanThang.Text; if (usrGoalDetail.Instance.tb_MaBanThang.Text != "") { var resultDialog = MessageBox.Show("Bạn có chắc muốn xóa bàn thắng?", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning); if (resultDialog == DialogResult.OK) { string DeleteQuery = "DELETE FROM BANTHANG WHERE MaBanThang= '" + MaBan + "'"; int result = DataProvider.Instance.ExecuteNonQuery(DeleteQuery); if (result > 0) { MessageBox.Show("Bàn thắng đã bị xóa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }