示例#1
0
        private void ExportStuFinish(HttpContext context, string id)
        {
            var exXls = new ExportXls();
            var fieldsNames = new List<string>();
            fieldsNames.Add("学员姓名");
            fieldsNames.Add("所在学校");
            fieldsNames.Add("联系电话");
            var quesBll = new BLL.Questionnaire();
            var ds = quesBll.GetfinishedStu(id);

            var courseBll = new BLL.Course();
            var courseModel = courseBll.GetModel(new Guid(id));

            var filename = courseModel.CourseName + "--已完成学员.xls";

            if (ds != null && ds.Tables.Count > 0)
            {
                exXls.ExportToXls(context.Response, fieldsNames, ds.Tables[0], filename);
            }
        }