n9 文件管理?qadfilemanager?jquery easyui filebox 上传附件 + asp.net后

电脑杂谈  发布时间:2016-06-20 00:01:57  来源:网络整理

你是否正在寻找关于filebox的内容?让我把最全的东西奉献给你:

Upload : IHttpHandler, IRequiresSessionState 2 { IsReusable 5 { ; } 7 } ProcessRequest(HttpContext context) 10 { { ]; 14 string userid = Utility.GetCurrentUser().zybh + ""; 15 16 HttpFileCollection httpFileCollection = context.Request.Files; 17 HttpPostedFile file = null; 18 if (httpFileCollection.Count > 0) 19 file = httpFileCollection[0]; 20 if (file != null) 21 { 22 DBHelp.DBExecute exe = new DBHelp.DBExecute(); 23 Sys_fjxx fjxx = ConvertFile(file); 24 fjxx.ssmk = fjssmk; + fjssmk + + DateTime.Today.ToString(); 26 fjxx.scrbh = int.Parse(userid); 27 // 28 SaveFile(fjxx.xdlj, fjxx.fwqwjm, file); 29 exe.Add(fjxx); 30 exe.DBCommit(); + fjxx.fwqwjm; + fjxx.fjbh + + url + );// 33 } 34 } 35 catch (Exception exp) 36 { 37 context.Response.Clear(); + exp.Message + ); 39 } { 42 context.Response.Flush(); 43 context.Response.End(); 44 } 45 } 转成Sys_fjxx Sys_fjxx ConvertFile(HttpPostedFile file) 52 { 53 FileInfo fi = new FileInfo(file.FileName); 54 Sys_fjxx fjxx = new Sys_fjxx(); , ); ).Replace(fi.Extension + , ""); 57 fjxx.kzm = fi.Extension; 58 fjxx.wjdx = Convert.ToDecimal(file.ContentLength) / 1024; 59 fjxx.fwqwjm = DateTime.Now.Ticks + fjxx.kzm; 60 fjxx.scsj = DateTime.Now; 61 return fjxx; 62 } SaveFile(string path, string filename, HttpPostedFile file) 65 { 66 if (!Directory.Exists(HttpContext.Current.Server.MapPath(path))) 67 { 68 Directory.CreateDirectory(HttpContext.Current.Server.MapPath(path)); 69 } + filename)); 71 } 72 }

以上就是关于filebox的全部内容,相信你一定会非常满意,。


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-10191-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...