Ejemplo n.º 1
0
        private void ExportXML(string searchString)
        {
            ExporterFactoryInterface exService = ExporterService.create("XML");
            String data = exService.exportFile(searchString);


            System.Web.HttpContext.Current.Response.ClearContent();
            System.Web.HttpContext.Current.Response.Buffer = true;
            System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename = exportXML.xml");
            System.Web.HttpContext.Current.Response.ContentType = "application/xml; charset=utf-8";
            System.Web.HttpContext.Current.Response.Write(data);
            System.Web.HttpContext.Current.Response.Flush();
            System.Web.HttpContext.Current.Response.End();
        }
Ejemplo n.º 2
0
 public ExportController()
 {
     _userService     = new UserService();
     _courseService   = new CourseService();
     _exporterService = new ExporterService();
 }