在B/S環境下
由於系統中員工的照片存儲在服務器硬盤上
在用戶操作界面
創建臨時文件夾
string Folder = DateTime
string tempFolder = Path
Directory
var empList = rs
拷貝照片文件
foreach (var x in empList)
{
File
}
產生RAR文件
RARsave(tempFolder
ResponseFile(tempFolder + @
public void RARsave(string patch
{
String the_rar;
RegistryKey the_Reg;
Object the_Obj;
String the_Info;
ProcessStartInfo the_StartInfo;
Process the_Process;
try
{
the_Reg = Registry
the_Obj = the_Reg
the_rar = the_Obj
the_Reg
the_rar = the_rar
Directory
//命令參數
//the_Info =
the_Info =
the_StartInfo = new ProcessStartInfo();
the_StartInfo
the_StartInfo
the_StartInfo
//打包文件存放目錄
the_StartInfo
the_Process = new Process();
the_Process
the_Process
the_Process
the_Process
}
catch (Exception ex)
{
throw ex;
}
}
protected void ResponseFile(string fileName)
{
FileInfo fileInfo = new FileInfo(fileName);
Response
Response
Response
Response
Response
Response
Response
Response
Response
Response
string tempPath = fileName
DelDir(tempPath);
Directory
Response
}
文章出處
From:http://tw.wingwit.com/Article/program/net/201311/13948.html