Exemple #1
0
        public void Download(int id, int start, int end, int type)
        {
            MemoryStream memoryStream = new MemoryStream();
            Reporter     report       = new Reporter(id, start, end, type);

            report.AppendToStream(memoryStream);

            Response.Clear();
            Response.ContentType = "application/force-download";
            Response.AddHeader($"content-disposition", $"attachment;    filename=LSGD_{DateTime.Now.Ticks}.xls");
            Response.BinaryWrite(memoryStream.ToArray());
            Response.End();
        }