void BindReportFile()
    {
        IList <ReportAttachFile> list = new List <ReportAttachFile>();

        list = new ReportAttachFileService().GetFileByReport(ReportId, Convert.ToInt32(LogType.AUDITREPORT));
        rptReportFile.DataSource = list;
        rptReportFile.DataBind();
    }
Example #2
0
    protected void lbtDownload_Click(object sender, EventArgs e)
    {
        LinkButton btnDownload = (LinkButton)sender;

        if (btnDownload != null && btnDownload.CommandArgument != null && btnDownload.CommandArgument != "")
        {
            int ReportFileId = Convert.ToInt32(btnDownload.CommandArgument);
            if (ReportFileId > 0)
            {
                ReportAttachFile reportAt = new ReportAttachFileService().FindByKey(ReportFileId);
                if (reportAt != null && reportAt.PathFile != "")
                {
                    string Filpath = Server.MapPath("~/UserFile/Report/" + reportAt.PathFile);
                    DownLoad(Filpath);
                }
            }
        }
    }