Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
DataCenter_Core2.1_20190520
Commits
27c8b464
Commit
27c8b464
authored
Jul 23, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整导出文件方式
parent
c7073986
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
OrdersController.cs
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
+12
-3
No files found.
Bailun.DC.Web/Areas/Reports/Controllers/OrdersController.cs
View file @
27c8b464
...
@@ -2253,9 +2253,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -2253,9 +2253,18 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
filename
=
"Ebay Paypal明细导出"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
);
var
filename
=
"Ebay Paypal明细导出"
+
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
);
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
listVal
,
colNames
,
guid
,
filepath
);
ToCSV
(
listVal
,
colNames
,
guid
,
filepath
);
return
File
(
"/Files/Report/"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"/"
+
guid
+
".csv"
,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
,
filename
+
".csv"
);
var
stream
=
new
System
.
IO
.
MemoryStream
();
using
(
System
.
IO
.
FileStream
fs
=
new
System
.
IO
.
FileStream
(
filepath
+
filename
+
".csv"
,
System
.
IO
.
FileMode
.
OpenOrCreate
))
{
stream
.
CopyTo
(
fs
);
fs
.
Flush
();
}
//return File("/Files/Report/" + DateTime.Now.ToString("yyyy-MM-dd") + "/" + guid + ".csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", filename + ".csv");
return
File
(
stream
,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
,
filename
+
".csv"
);
}
}
#
endregion
#
endregion
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment