| | |
| | | HttpPostedFile files = HttpContext.Current.Request.Files["file"]; //忮䏻å
ç |
| | | string path = HttpContext.Current.Server.MapPath("~/../Files/" + HBillNo); |
| | | //string path = @"D:\\Files\\"+ HBillNo; |
| | | dynamic dyResult = UpLoadFile(files, path, HBillNo, HInterID, HUserName); |
| | | Int64 HEntryID = Convert.ToInt64(HttpContext.Current.Request.Params["HEntryID"]); //åå
ç |
| | | dynamic dyResult = UpLoadFile(files, path, HBillNo, HInterID, HUserName, HEntryID); |
| | | if (dyResult != null && dyResult.result == 1) |
| | | { |
| | | objJsonResult.code = "1"; |
| | |
| | | |
| | | } |
| | | |
| | | public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HInterID, string HUserName) |
| | | public dynamic UpLoadFile(HttpPostedFile files, string path, string HBillNo, string HInterID, string HUserName,Int64 HEntryID) |
| | | { |
| | | dynamic Result_Ob = new { result = 1, returnval = "ä¸ä¼ æåï¼" }; |
| | | string filePath = Path.GetFullPath(files.FileName);//æä»¶ä¸ä¼ è·¯å¾ |
| | |
| | | ",HUpMan,HUpTime,HInterID,HEntryID,HSno,HFileID,HFileSize" + |
| | | ") values('" |
| | | + filename.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + |
| | | ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + 0 + "','" + Sno + "','" + lID + "','" + 0 + |
| | | ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + HEntryID + "','" + Sno + "','" + lID + "','" + filesize + |
| | | "') "); |
| | | } |
| | | else |
| | |
| | | ",HUpMan,HUpTime,HInterID,HEntryID,HSno,HFileID,HFileSize" + |
| | | ") values('" |
| | | + filename.ToString() + "','" + filePath.ToString() + "','" + fileExtension.ToString() + "'" + |
| | | ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + 222 + "','" + 333 + "','" + 444 + "','" + 555 + |
| | | ",'" + HUserName + "',getdate()" + ",'" + HInterID + "','" + HEntryID + "','" + Sno + "','" + lID + "','" + filesize + |
| | | "') "); |
| | | } |
| | | else |