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
16993d3e
Commit
16993d3e
authored
Dec 09, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
3d2eee27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+17
-14
RB_Class_TimeRepository.cs
Edu.Repository/Course/RB_Class_TimeRepository.cs
+10
-0
No files found.
Edu.Module.Course/ClassModule.cs
View file @
16993d3e
...
...
@@ -540,30 +540,33 @@ namespace Edu.Module.Course
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_Plan_ViewModel
.
ClassRoomId
),
extModel
.
ClassRoomId
}
{
nameof
(
RB_Class_Plan_ViewModel
.
ClassRoomId
),
extModel
.
ClassRoomId
},
{
nameof
(
RB_Class_Plan_ViewModel
.
TeacherId
),
extModel
.
TeacherId
},
{
nameof
(
RB_Class_Plan_ViewModel
.
ClassDate
),
extModel
.
ClassDate
},
};
flag
=
class_PlanRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassPlanId
),
extModel
.
ClassPlanId
));
if
(
extModel
.
PlanTimeList
!=
null
&&
extModel
.
PlanTimeList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
PlanTimeList
)
{
flag
=
class_TimeRepository
.
Update
(
item
);
}
}
}
else
{
var
newId
=
class_PlanRepository
.
Insert
(
extModel
);
extModel
.
ClassPlanId
=
newId
;
flag
=
newId
>
0
;
if
(
extModel
.
PlanTimeList
!=
null
&&
extModel
.
PlanTimeList
.
Count
>
0
)
}
class_TimeRepository
.
DeleteClassTimeByPlanIdRepository
(
extModel
.
ClassPlanId
);
if
(
extModel
.
PlanTimeList
!=
null
&&
extModel
.
PlanTimeList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
PlanTimeList
)
{
foreach
(
var
item
in
extModel
.
PlanTimeList
)
item
.
ClassId
=
extModel
.
ClassId
;
item
.
ClassPlanId
=
extModel
.
ClassPlanId
;
item
.
Group_Id
=
extModel
.
Group_Id
;
item
.
School_Id
=
extModel
.
School_Id
;
if
(
item
.
ClassTimeId
>
0
)
{
flag
=
class_TimeRepository
.
Update
(
item
);
}
else
{
item
.
ClassId
=
extModel
.
ClassId
;
item
.
ClassPlanId
=
extModel
.
ClassPlanId
;
item
.
Group_Id
=
extModel
.
Group_Id
;
item
.
School_Id
=
extModel
.
School_Id
;
flag
=
class_TimeRepository
.
Insert
(
item
)
>
0
;
}
}
...
...
Edu.Repository/Course/RB_Class_TimeRepository.cs
View file @
16993d3e
...
...
@@ -57,6 +57,16 @@ WHERE 1=1
return
base
.
DeleteOne
(
new
VT
.
FW
.
DB
.
WhereHelper
(
nameof
(
RB_Class_Time_ViewModel
.
ClassId
),
ClassId
));
}
/// <summary>
/// 根据计划删除班级上课时间
/// </summary>
/// <param name="ClassPlanId">班级编号</param>
/// <returns></returns>
public
bool
DeleteClassTimeByPlanIdRepository
(
int
ClassPlanId
)
{
return
base
.
DeleteOne
(
new
VT
.
FW
.
DB
.
WhereHelper
(
nameof
(
RB_Class_Time_ViewModel
.
ClassPlanId
),
ClassPlanId
));
}
/// <summary>
/// 获取班级上课时间
/// </summary>
...
...
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