//CHECK ANSWER private void rad_check_CheckedChanged(object sender, EventArgs e) { EventHandler check = onCheck; if (check != null) { MyEventArgs args = new MyEventArgs(); args.IDAnswer = iD_Answer; check(this, args); } }
//DELETE ANSWER private void btn_Delete_Click(object sender, EventArgs e) { EventHandler delete = onDelete; if (delete != null) { MyEventArgs args = new MyEventArgs(); args.IDAnswer = iD_Answer; delete(this, args); } }
private void deleteSetupToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show("Bạn muốn xóa cuộc thi này không?", "Xóa Thiết Đặt", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Contest Contest = new Contest(); Phase Phase = new Phase(); Player Player = new Player(); Record Record = new Record(); ContestBL ContestBL = new ContestBL(); PhaseBL PhaseBl = new PhaseBL(); PlayerBL PlayerBL = new PlayerBL(); PhaseQuestionBL PhaseQuestionBL = new PhaseQuestionBL(); RecordBL RecordBL = new RecordBL(); Contest.IDContest = Convert.ToInt32(lbl_IDContest.Text); Phase.IDContest = Convert.ToInt32(lbl_IDContest.Text); Player.IDContest = Convert.ToInt32(lbl_IDContest.Text); Record.IDContest = Convert.ToInt32(lbl_IDContest.Text); RecordBL.DeleteRecordByIDContest(Record); PhaseQuestionBL.DeletePhaseQuestionbyIDContest(Phase); PlayerBL.DeletePlayerbyIDContest(Player); PhaseBl.DeletePhasebyIDContest(Phase); ContestBL.DeleteContestbyID(Contest); LoadAll(); EventHandler delete = onDelete; if (delete != null) { MyEventArgs args = new MyEventArgs(); args.IDNewGame = iD_NewGame; delete(this, args); } } }