【正文】
個遞歸函數(shù),由于文件目錄級是一個樹型結構,采用遞歸算法是一個比較好的選擇。 int flag = (table, cmdText)。 系統(tǒng)測試(可選) 30 int flag = (AddDirectory, Parameters)。 山東科技大學泰山科技學院畢業(yè)設計(論文)說明書 ……………………………裝……………………………………訂…………………………………線…………………………… 31 ///定義 SQL語句 string cmdText = UPDATE Directory SET Name = + 39。實現(xiàn)代碼如下: public int DeleteFile(int nFileID) { ///創(chuàng)建鏈接 exec = new ()。實現(xiàn)代碼如下: public int MoveFile(int nFileID,int nParentID) { exec = new ()。實現(xiàn)代碼如下: public DataTable GetSingleFile(int nFileID) { exec = new ()。 添加文件 方法 AddFile()用來向指定目錄添加一個新的文件(見圖 36)。添加一個文件所包含的業(yè)務邏輯如下:第一向表 Directory 插入一條新數(shù)據(jù)表示新添加一個文件,第二修改父目錄的文件數(shù)量使其加 1,第三向表Url 插入一條數(shù)據(jù)本來記錄文件的存儲地址。刪除一個文件所包含的業(yè)務邏輯如下:第一刪除表 Url中存儲的文件地址,第二刪除表 Directory 中文件記錄,第三修改父目錄的文件數(shù)量使其減 1。 int flag = (table, cmdText)。具體代碼如下: protected void Page_Load (object sender, EventArgs e) { String file =。事實上,最簡單的下載就是直接將 URL 連接到需下載的文件即可,但是這樣的弊端是無法直接下載一些格式的文件(如 TXT, JPG, GIF 等文件),原因是單純的URL 連接會默認連接到一個 html 網(wǎng)頁,如果該文件可以用 HTML 網(wǎng)頁打開,就會直接用 HTML 網(wǎng)頁打開( TXT,大部分圖片格式都可以使用 HTML網(wǎng) 頁 直 接 打 開 )。% + sKey + %39。 此外,該方法實現(xiàn)調(diào)用了存儲過程 Pr_DeleteFile。 } 山東科技大學泰山科技學院畢業(yè)設計(論文)說明書 ……………………………裝……………………………………訂…………………………………線…………………………… 35 AddFile()包含六個參數(shù),其中 sName 表示文件名, nParentID 表示目錄的 ID, nContain 表示文件的大小, sUrl 表示存儲的位置, sType 為文件類型,UserID 表示當前登錄用戶此外,該方法實現(xiàn)調(diào)用了存儲過程 Pr_AddFile。 } else { return null。移動一個文 件夾所包含的業(yè)務邏輯是比較復雜的:第一要修改被移動文件夾的父目錄中文件夾的數(shù)量(減去由被移動文件夾所包含文件夾數(shù)量加 1 得到的數(shù)量),第二修改被移動文件夾的父目錄中文件的數(shù)量(減由被移動文件夾所包含文件的數(shù)量),第三修改被移動文件夾的父目錄屬性 ParentID 為目標目錄的 ID。該存儲過程包含兩個業(yè)務:第一從數(shù)據(jù)表 Directory 中刪除指定的數(shù)據(jù);第二更新父目錄文件中文件夾數(shù)量屬性 DirCount,使其減 1。該方法很簡單,就像它實現(xiàn)的業(yè)務邏輯一樣簡單,只是執(zhí)行一條更新語句。 編輯目錄 方法 EditDirectory()用來編輯指定的目錄(見圖 34)。實現(xiàn)代碼如下: public int AddDirectory(string sName, int nParentID, int userID) { exec = new ()。 DataTable table = new DataTable()。 ///創(chuàng)建新節(jié)點 (new ListItem(sName,row[DirID].ToString()))。 ///創(chuàng)建其他節(jié)點 CreateChildNode(dirList, dataTable, 0, /)。 /// Disk 的摘要說明 public class Disk { } 代碼首部添加了一些需要用到的命名空間的引用,主體定義非常簡單。 using 。數(shù)據(jù)庫語言主 要是采用 SQL。 圖 410 查看文件屬性模塊 4 系統(tǒng)設計 22 刪除和移動文件的操作與刪除和移動文件夾的操作一樣,此外還可以下載上傳的在線文件管理系統(tǒng)空間的數(shù)據(jù)文件。在圖 37 中單 擊“瀏覽”按鈕打開如圖 47 所示的界面,用戶通過該界面瀏覽本地機器上要上傳的文件,選中要上傳的文件,單擊“打開”按鈕即可。系統(tǒng)會提示用戶讓他確認是否真的刪除該文件夾,提示界面如圖 44 所示。單擊圖中的“ [新建文件夾 ]”按鈕,打開如圖 42 所示的界面。 需求分析 10 文 件 目 錄添 加 文 件 夾移 動 文 件 /文 件 夾搜 索 文 件文 件 夾 名文 件 / 文 件夾 位 置文 件 信 息上 傳 文 件所 在 文 件夾文 件 信 息文 件文 件 下 載下 載系 統(tǒng)用 戶文 件 夾 信 息記 錄圖 31 在線文件虛擬管理系統(tǒng)業(yè)務流程圖 在 線 文 件 虛 擬 管 理 系 統(tǒng)用 戶文 件 / 文 件 夾 變更 信 息文 件 信 息文 件 下 載 圖 32 在線文件虛擬管理系統(tǒng)頂層數(shù)據(jù)流圖 對數(shù)據(jù)流就行更進一步的分析,可以分析出在線文件虛擬管理系統(tǒng)中具體到各模塊的數(shù)據(jù)流向,可以畫出整體數(shù)據(jù)流圖,如圖 33 所示。 所以說,此系統(tǒng)在實施上是可行的。下面,對邏輯方案的可行性進行一一分析。 ASP 吸收了當今許多流行的技術,如 IIS, ACTIVEX, VBSCRIPT, ODBC等,是一種發(fā)展較為成熟的網(wǎng)絡應用程序開發(fā)技術;其核心技術是對組件山東科技大學泰 山科技學院畢業(yè)設計(論文)說明書 ……………………………裝……………………………………訂…………………………………線…………………………… 5 和對象技術的充分支持。 60 年代末期開始出現(xiàn)”軟件危機”的種種跡象,人們逐漸認識到用個人小型程序的那種手工方式來研究軟件已經(jīng)不行了,必須尋找新技術來指導軟件的開發(fā)。 SQLServer 存儲過程是用 TransactSQL 語 句 CREATE PROCEDURE 創(chuàng)建的,并可用 ALTER PROCEDURE 語句進行修改。允許更快執(zhí)行。中間業(yè)務層:負責處理用戶輸入的信息,或者是將這些信息發(fā)送給數(shù)據(jù)訪問層進行保存,或者是調(diào)用數(shù)據(jù)訪問層中的函數(shù)再次讀出這些數(shù)據(jù)。較 FTP 上傳有明顯的優(yōu)勢。 英國 Ewedrive 提供 1GB 的免費存儲空間,比 較好的是它不限制單個文件大小。 關鍵詞: 上傳,下載,數(shù)據(jù)庫 ,文件管理 ,ABSTRACT II ABSTRACT With the fast development of puter and work technology, it is an inevitable tendency for panies to manage documents by the use of puter and work technology. In that way, it is advantageous to share information and reduce the workload of managers. It will make the document management more scientific, more standard and much safer. Therefore, it is very essential to design a safe work file management system. Online file virtual management system is developed by the SQL Server server and technology in the environment which is Composed of a bination of Visual Studio 2020 integrated development environment and database software SQL Server 2020. According to the demand of the system online file virtual management system, it mainly has the file management and file management functions of the two. This system has realized the mobile office, meeting the needs of users in any place and time for personal file upload, download, delete the folder, and new operational changes demand, and realizes the remote data sharing, the Inter into a system can be quickly shared resources edge. After two months of hard work, to modify and improve the system step by step, system has been basically can effectively acplish its intended function. keywords: Upload, Download, Database, File Management , 目 錄 III 目 錄 1 緒論 .............................................................................................. 1 課題背景 ................................................................................................ 1 國內(nèi)外研究現(xiàn)狀 .................................................................................... 1 課題研究內(nèi)容 ........................................................................................ 2 相關知識概述 ........................................................................................ 2 2 可行性分析 .................................................................................. 7 技術可行性分析 .................................................................................... 7 經(jīng)濟可行性分析 .................................................................................... 7 實施可行性分析 ...............................