資源簡介
一個.NET開發的小項目,有源代碼,可以共初學者參考
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?DAL;
namespace?BLL
{
???public??class?DatabaseManager
????{
????????///?
????????///?備份數據庫
????????///?
????????///?備份路徑
????????///?輸出的操作信息(如:成功,失敗等)
????????///?是否成功
????????DatabaseDB?dbd?=?new?DatabaseDB();
????????public?string?BackupDb(string?path)
????????{
????????????string?message?=?““;
????????????try
????????????{
???????????????dbd.BackupDatabase(path);
????????????????message?=?“備份完成!“;????????????
????????????}
????????????catch?(Exception?e)
????????????{
????????????????message?=?“備份失敗!“?+?e.Message;
???????????????
????????????}
????????????return?message;
????????}
???????
????????///?
????????///?附加數據庫
????????///?
????????public?void?AttachDB(string?dbname?string?datafile?string?logfile)
????????{
????????????if?(string.IsNullOrEmpty(dbname.Trim())?||
????????????????string.IsNullOrEmpty(datafile.Trim())?||
????????????????string.IsNullOrEmpty(logfile.Trim()))
????????????????throw?new?ArgumentNullException();
????????????dbd.AttachDB(dbname?datafile?logfile);
????????}
????????///?
????????///?分離數據庫
????????///?
????????public?void?DetachDB(string?dbname)
????????{
????????????if?(string.IsNullOrEmpty(dbname.Trim()))?throw?new?ArgumentNullException();
????????????dbd.Detach(dbname);
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????24088??2008-07-07?00:59??新項目\新項目\databa
?????文件??????32768??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\DAL.dll
?????文件??????20480??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\Module.dll
?????文件??????24576??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\SqlHelper.dll
?????文件??????46592??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\Module.pdb
?????文件??????30208??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\SqlHelper.pdb
?????文件??????54784??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\DAL.pdb
?????文件??????24576??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\BLL.dll
?????文件??????46592??2008-07-11?17:44??新項目\新項目\Medicine\BLL\bin\Debug\BLL.pdb
?????文件??????24576??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\BLL.dll
?????文件??????42496??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\BLL.pdb
?????文件??????32768??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\DAL.dll
?????文件??????52736??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\DAL.pdb
?????文件??????20480??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\Module.dll
?????文件??????42496??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\Module.pdb
?????文件??????24576??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\SqlHelper.dll
?????文件??????26112??2008-07-10?03:25??新項目\新項目\Medicine\BLL\bin\Release\SqlHelper.pdb
?????文件???????2869??2008-07-07?00:53??新項目\新項目\Medicine\BLL\BLL.csproj
?????文件???????1560??2008-07-08?12:31??新項目\新項目\Medicine\BLL\Databa
?????文件???????3884??2008-07-06?23:46??新項目\新項目\Medicine\BLL\InStockManager.cs
?????文件???????5667??2008-07-06?01:27??新項目\新項目\Medicine\BLL\MedicineManager.cs
?????文件????????522??2008-07-11?17:48??新項目\新項目\Medicine\BLL\obj\BLL.csproj.FileList.txt
?????文件??????16384??2008-07-06?09:25??新項目\新項目\Medicine\BLL\obj\Debug\Refactor\BLL.dll
?????文件???????9239??2008-07-11?17:44??新項目\新項目\Medicine\BLL\obj\Debug\ResolveAssemblyReference.cache
?????文件??????46592??2008-07-11?17:44??新項目\新項目\Medicine\BLL\obj\Debug\BLL.pdb
?????文件??????24576??2008-07-11?17:44??新項目\新項目\Medicine\BLL\obj\Debug\BLL.dll
?????文件??????24576??2008-07-10?03:25??新項目\新項目\Medicine\BLL\obj\Release\BLL.dll
?????文件??????42496??2008-07-10?03:25??新項目\新項目\Medicine\BLL\obj\Release\BLL.pdb
?????文件???????9462??2008-07-10?03:25??新項目\新項目\Medicine\BLL\obj\Release\ResolveAssemblyReference.cache
?????文件???????2523??2008-07-03?02:54??新項目\新項目\Medicine\BLL\OutStockManager.cs
............此處省略475個文件信息
評論
共有 條評論