文档管理系统的设计与实现_毕业论文 联系客服

发布时间 : 星期日 文章文档管理系统的设计与实现_毕业论文更新完毕开始阅读68f61ed80129bd64783e0912a216147917117ecf

//zip all folder zip file FolderPath = ZipPath;

AllZipName = ZipPath + \ ZipFile(FolderPath, AllZipName, out ErrorMsg);

return AllZipName; }

catch (Exception ex) {

throw ex; } }

4.3.4 文件上传与下载

文档上传/下载界面界面如下图4-5所示:

图4-5 文档上传/下载界面

1. 此页面是整个系统最重要的页面,大部分文件操作的功能在当前页面实现,主要功

能有

a. 多文件上传,当前上传的文件成为最新版本的文件,以前的文件将成为历史文

件,在文件名后面加上时间戳保存到历史文件目录下 b. 对某个文件更改文件描述与关键字 c. 查看所有的历史版本文件 d. 打包下载所有的历史版本文件 e. 删除所有的历史版本文件

f. 显示产品某个文件目录下所有文件 2.多文件上传代码 protected void Button_Upload_Click(object sender, EventArgs e) {

if (!SecurityManager.IsSessionValid(this.Session)) {

SecurityManager.DenyAccess(this.Page);

- 20 -

return; }

int i,longAllowSize,RecordCount; int SucessCount = 0; int FailCount = 0;

string Description, FileFullPath, FileName, KeyWord, FileExt;

……

new SqlParameter(\

int DeleteCount = DBHelper.ExecuteNonQuery(delSql, Delparms);

return true; }

catch (Exception ex) {

throw ex; }

}

查看所有的历史版本文件

gvrow = (GridViewRow)((ImageButton)e.CommandSource).NamingContainer;

FileId = ((Label)gvrow.FindControl(\

int historyCnt = GetHistoryVersionsCount(FileId); if (historyCnt == 0) {

ClientScript.RegisterStartupScript(this.GetType(), \\type=\\\

return; }

url = String.Format(\

Request.QueryString[\

//url = String.Format(\Request.QueryString[\

Response.Redirect(url, true);

break;

打包下载所有的历史版本文件 case \

gvrow = (GridViewRow)((ImageButton)e.CommandSource).NamingContainer;

- 21 -

FileId = ((Label)gvrow.FindControl(\ FileName = ((LinkButton)gvrow.FindControl(\

if (string.IsNullOrEmpty(FileName))

……

return; }

FileProcess.FileDownLoad(ZipfileName, this.Page, true);

break;

4.3.5 文档查询

文档查询界面如图4-6所示:

图4-6 文档查询界面

public void SearcheContentFolder() {

string ProductId, url, SearchText;

ProductId = Request.QueryString[\ SearchText = TextBox_search.Text; if (CheckSearchCount(SearchText) < 1) {

ScriptManager.RegisterStartupScript(this.UpdatePanel2,

this.UpdatePanel2.GetType(), \

return; }

if (this.CheckBox1.Checked) { url String.Format(\

- 22 -

=

Response.Redirect(url, true); } else {

url = String.Format(\ProductId, SearchText);

Response.Redirect(url, true); } }

- 23 -