public ExAnswer(ExAnswer cau) { this.CauHoi = cau.CauHoi; this.DapA = cau.DapA; this.DapB = cau.DapB; this.DapC = cau.DapC; this.DapD = cau.DapD; this.DapAn = cau.DapAn; this.BanChon = cau.BanChon; }
private void TaoDe() { con.SqlQuery("select * from dbo.CAUHOI where MaDe='" + cbbMaDe.Text + "' ORDER BY NEWID()"); con.SqlReader = con.Cmd.ExecuteReader(); while (con.SqlReader.Read()) { ExAnswer Ques = new ExAnswer(); Ques.CauHoi = con.SqlReader["CauHoi"].ToString(); Ques.DapA = con.SqlReader["DapA"].ToString(); Ques.DapB = con.SqlReader["DapB"].ToString(); Ques.DapC = con.SqlReader["DapC"].ToString(); Ques.DapD = con.SqlReader["DapD"].ToString(); Ques.DapAn = con.SqlReader["DapAn"].ToString(); anwserC.Add(Ques); } con.SqlReader.Close(); }