Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
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
黄奎
Education
Commits
5925413b
Commit
5925413b
authored
Mar 06, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
068d1c08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+18
-14
No files found.
Edu.Module.Course/CourseModule.cs
View file @
5925413b
...
...
@@ -1011,26 +1011,30 @@ namespace Edu.Module.Course
{
flag
=
course_PreferentialRepository
.
DeleteCoursePreferentialRepostory
(
courseModel
.
CourseId
);
}
//找出差异的数据
var
deleteList
=
oldList
.
Where
(
qitem
=>
!
list
.
Any
(
oldItem
=>
qitem
.
Id
==
oldItem
.
Id
)).
ToList
();
foreach
(
var
dItem
in
deleteList
)
else
{
if
(
dItem
.
Id
>
0
)
{
flag
=
course_PreferentialRepository
.
Delete
(
dItem
.
Id
)
>
0
;
}
}
foreach
(
var
priceItem
in
list
)
{
if
(
priceItem
.
Id
==
0
)
//找出差异的数据
var
deleteList
=
oldList
.
Where
(
qitem
=>
!
list
.
Any
(
oldItem
=>
qitem
.
Id
==
oldItem
.
Id
)).
ToList
();
foreach
(
var
dItem
in
deleteList
)
{
flag
=
course_PreferentialRepository
.
Insert
(
priceItem
)
>
0
;
if
(
dItem
.
Id
>
0
)
{
flag
=
course_PreferentialRepository
.
Delete
(
dItem
.
Id
)
>
0
;
}
}
else
foreach
(
var
priceItem
in
list
)
{
flag
=
course_PreferentialRepository
.
Update
(
priceItem
);
if
(
priceItem
.
Id
==
0
)
{
flag
=
course_PreferentialRepository
.
Insert
(
priceItem
)
>
0
;
}
else
{
flag
=
course_PreferentialRepository
.
Update
(
priceItem
);
}
}
}
}
return
flag
;
}
...
...
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