//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. ¶Ôij¸öÎļþ¸ü¸ÄÎļþÃèÊöÓë¹Ø¼ü×Ö c. ²é¿´ËùÓеÄÀúÊ·°æ±¾Îļþ d. ´ò°üÏÂÔØËùÓеÄÀúÊ·°æ±¾Îļþ e. ɾ³ýËùÓеÄÀúÊ·°æ±¾Îļþ
f. ÏÔʾ²úƷij¸öÎļþĿ¼ÏÂËùÓÐÎļþ 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 -