Example #1
0
        private void btnExportQuestion_Click(object sender, EventArgs e)
        {
            List <Question> lst = new List <Question>();

            using (var db = new dbQLThiTracNghiemDataContext())
            {
                lst = db.Questions.ToList();
            }
            myExcel.Export(MyTool.ConvertToDataTable(lst));
            MessageBox.Show("Xuất câu hỏi thành công!");
        }