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
ab0c7ff2
Commit
ab0c7ff2
authored
Sep 24, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增课程,章节处理类
parent
2e5d4d2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+62
-0
No files found.
Edu.Module.Course/CourseModule.cs
View file @
ab0c7ff2
...
...
@@ -109,5 +109,67 @@ namespace Edu.Module.Course
bool
flag
=
courseRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_ViewModel
.
CourseId
),
CourseId
));
return
flag
;
}
/// <summary>
/// 新增修改课程通知
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetNoticeModule
(
RB_Course_Notice_ViewModel
model
)
{
bool
flag
;
if
(
model
.
NoticeId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Course_Notice_ViewModel
.
Title
),
model
.
Title
}
};
flag
=
noticeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Notice_ViewModel
.
NoticeId
),
model
.
NoticeId
));
}
else
{
var
newId
=
noticeRepository
.
Insert
(
model
);
model
.
NoticeId
=
newId
;
flag
=
newId
>
0
;
}
return
flag
;
}
/// <summary>
/// 获取课程通知实体
/// </summary>
/// <param name="NoticeId"></param>
/// <returns></returns>
public
RB_Course_Notice_ViewModel
GetNoticeModule
(
object
NoticeId
)
{
return
noticeRepository
.
GetEntity
<
RB_Course_Notice_ViewModel
>(
NoticeId
);
}
/// <summary>
/// 根据通知编号删除通知
/// </summary>
/// <param name="NoticeId"></param>
/// <returns></returns>
public
bool
RemoveNoticeModule
(
object
NoticeId
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Course_Notice_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Delete
}
};
bool
flag
=
noticeRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Notice_ViewModel
.
NoticeId
),
NoticeId
));
return
flag
;
}
/// <summary>
/// 新增通知阅读
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
AddNoticeRevice
(
RB_Course_NoticeRevice_ViewModel
model
)
{
var
newId
=
noticeReviceRepository
.
Insert
(
model
);
model
.
ReviceId
=
newId
;
return
newId
>
0
;
}
}
}
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