예제 #1
0
파일: fewijoattach.cs 프로젝트: dfsklar/RAF
        public void ProcessRequest(HttpContext context)
        {
            int id = Int32.Parse(context.Request.Params["id"]);

            context.Response.ContentType = "binary";
            context.Response.AddHeader("Content-Disposition",
                                       "filename=export.bin;attachment");


            IEASfileAttachment engine =
                new IEASfileAttachment(HELPERS.NewOdbcConn_FORCE());


            //context.Response.
        }
예제 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (this.FileUpload1.HasFile)
            {
                string pathTempFolder = System.IO.Path.GetTempPath();
                string pathTempFile   = System.IO.Path.GetTempFileName();

                FileUpload1.SaveAs(pathTempFile);

                IEASfileAttachment engine =
                    new IEASfileAttachment(HELPERS.NewOdbcConn_FORCE());
                int baby = engine.NewEASfileAttachment(
                    this.FileUpload1.FileName,
                    TXTcomment.Text, DateTime.Now,
                    this.session.idWorkspace);
                engine.UploadEASfileAttachmentContent
                    (baby, pathTempFile);
                Response.Redirect("PAGE_attachments.aspx?mode=success");
            }
        }
예제 #3
0
        public void ProcessRequest(HttpContext context)
        {
            int id = Int32.Parse(context.Request.Params["id"]);

            returnDownloadEASfileAttachmentContent down = new returnDownloadEASfileAttachmentContent();


            IEASfileAttachment engine =
                new IEASfileAttachment(HELPERS.NewOdbcConn_FORCE());

            returnGetEASfileAttachment details = engine.GetEASfileAttachment(id);



            context.Response.ContentType = "binary";
            context.Response.AddHeader("Content-Disposition",
                                       "filename=" + details.Filename + ";attachment");


            down =
                engine.DownloadEASfileAttachmentContent(id);
            context.Response.OutputStream.Write(down.Content, 0, down.Content.Length);
        }