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
0838e9c0
Commit
0838e9c0
authored
Sep 06, 2019
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决时间格式问题
parent
bc266271
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
4 deletions
+35
-4
FinanceController.cs
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
+35
-4
No files found.
Bailun.DC.Web/Areas/Reports/Controllers/FinanceController.cs
View file @
0838e9c0
...
@@ -4594,6 +4594,15 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -4594,6 +4594,15 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
indexdot
=
accountname
.
ToLower
().
IndexOf
(
".csv"
);
var
indexdot
=
accountname
.
ToLower
().
IndexOf
(
".csv"
);
accountname
=
accountname
.
Substring
(
0
,
indexdot
);
accountname
=
accountname
.
Substring
(
0
,
indexdot
);
if
(
accountname
.
Length
==
0
)
{
return
Json
(
new
{
success
=
false
,
msg
=
"请填写正确的帐号信息"
});
}
var
read
=
new
System
.
IO
.
StreamReader
(
file
.
OpenReadStream
());
var
read
=
new
System
.
IO
.
StreamReader
(
file
.
OpenReadStream
());
var
list
=
new
List
<
dc_base_income_ebay_paypal
>();
var
list
=
new
List
<
dc_base_income_ebay_paypal
>();
...
@@ -4619,12 +4628,36 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -4619,12 +4628,36 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
arr
=
s
.
Split
(
','
);
var
arr
=
s
.
Split
(
','
);
if
(
arr
.
Length
>
1
)
if
(
arr
.
Length
>
1
)
{
{
var
time
=
DateTime
.
Now
;
if
(
isChs
==
1
)
{
time
=
DateTime
.
Parse
(
arr
[
0
]
+
" "
+
arr
[
1
]);
}
else
{
var
arrDate
=
arr
[
0
].
Split
(
'/'
);
if
(
arrDate
.
Length
==
3
)
{
time
=
DateTime
.
Parse
(
arrDate
[
2
]+
"-"
+
arrDate
[
0
]+
"-"
+
arrDate
[
1
]+
" "
+
arr
[
1
]);
}
else
{
return
Json
(
new
{
success
=
false
,
msg
=
"第"
+
row_index
+
"行时间格式转换失败,请重试或联系管理员。"
,
});
}
}
try
try
{
{
var
m
=
new
dc_base_income_ebay_paypal
()
var
m
=
new
dc_base_income_ebay_paypal
()
{
{
company_id
=
companyid
,
company_id
=
companyid
,
record_time
=
DateTime
.
Parse
(
arr
[
0
]
+
" "
+
arr
[
1
])
,
record_time
=
time
,
account_name
=
accountname
,
account_name
=
accountname
,
time_zone
=
arr
[
2
],
time_zone
=
arr
[
2
],
...
@@ -4850,9 +4883,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
...
@@ -4850,9 +4883,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
var
Quantity
=
row
[
"Quantity"
];
var
Quantity
=
row
[
"Quantity"
];
var
Balance
=
row
[
"Balance"
];
var
Balance
=
row
[
"Balance"
];
var
m
=
new
dc_base_income_ebay_paypal
()
{
var
m
=
new
dc_base_income_ebay_paypal
()
{
company_id
=
companyid
,
company_id
=
companyid
,
record_time
=
DateTime
.
Parse
(
Date
+
" "
+
Time
),
record_time
=
DateTime
.
Parse
(
Date
+
" "
+
Time
),
...
...
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