使用BV.net为每条记录上传多个pdf文件 [英] uploading multiple pdf files for each records using BV.net

查看:67
本文介绍了使用BV.net为每条记录上传多个pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的注册表,其中有许多关于SQL Server 2008 R2的记录和



我需要浏览以上传每个记录的pdf文件并显示它们在注册页面上。注册页面是在vb.net中开发的。



EnrollmentID是主键。因此,当我打开每个注册时,我应该只看到注册者的上传文件。



如何使用vb.net实现这一目标?



谢谢

I have an existing Enrollment table with many records on SQL Server 2008 R2 and

I need to browse to upload pdf file/s for each record and show them on Enrollment page.Enrollment page is developed in vb.net.

EnrollmentID is the primary key. So when I open each enrollment, I should see only that enrollmen's uploaded file.

How can I achieve that by using vb.net?

Thanks

推荐答案

没有更多信息我正在努力理解这一点,是否将文件上传到数据库?



您可以随时从enrollmentid PK开始按顺序重命名PDF。



例如:



原始文件:MyUploadedDocumentForDev.pdf

新文件名:< enrollment_id> _< count_of_pdf_with_this_prefix.pdf>

报名人数:12345678

总博客以12345678开头= 4

新文件:12345678_8.pdf。



然后在VB中,您只需枚举以12345678 * .pdf开头的任何内容,而不是枚举所有上传的文件。



如果要将记录插入数据库以显示如果您已经上传了pdf,则可以在 ForeignKey 中添加另一列,这是Enrollee的注册ID。



Without more information i am struggling to understand this, are uploading the files to the database?

You could always rename the PDF sequentially starting with the enrollmentid PK.

For example:

Original File: MyUploadedDocumentForDev.pdf
New File Name: <enrollment_id>_<count_of_pdf_with_this_prefix.pdf>
Enrollment Id: 12345678
Total Docs starting with 12345678 = 4
New File: 12345678_8.pdf.

Then in VB, instead of enumerating all uploaded files, you just enumerate anything that begins with 12345678*.pdf.

If you are inserting a record into the database to show that you have uploaded a pdf, you can add another column in as a ForeignKey which is the Enrollee's Enrolment ID.

INSERT INTO [MyDB].[dbo].[MyPDFTable] (EnrollmentId, PDFName, PDFDirectory) VALUES ('12345678','12345678_4.pdf','/home/wwwroot/uploads')





其中EnrollmentId与登记者的登记ID相同'



然后在您的页面上





Where EnrollmentId is the same enrollment id as the enrollee'

then on your page

SELECT * FROM [MyDB].[dbo].[MyPDFTable] WHERE EnrollmentId = '12345678'





没有更多信息可以提供更多建议。



Without more info struggling to offer more advice.


这篇关于使用BV.net为每条记录上传多个pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆