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
23b6e35f
Commit
23b6e35f
authored
Oct 21, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
66fb44d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
RB_Manager.cs
Edu.Model/Entity/User/RB_Manager.cs
+4
-0
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+6
-3
StudentModule.cs
Edu.Module.User/StudentModule.cs
+4
-3
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+5
-3
No files found.
Edu.Model/Entity/User/RB_Manager.cs
View file @
23b6e35f
...
...
@@ -66,5 +66,9 @@ namespace Edu.Model.Entity.User
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 角色列表
/// </summary>
public
string
RoleAuth
{
get
;
set
;
}
}
}
Edu.Module.User/ManagerModule.cs
View file @
23b6e35f
...
...
@@ -54,7 +54,9 @@ namespace Edu.Module.User
{
nameof
(
RB_Manager_ViewModel
.
MName
),
model
.
MName
.
Trim
()},
{
nameof
(
RB_Manager_ViewModel
.
MTel
),
model
.
MTel
.
Trim
()},
{
nameof
(
RB_Manager_ViewModel
.
MHead
),
model
.
MHead
},
{
nameof
(
RB_Manager_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Manager_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Manager_ViewModel
.
RoleAuth
),
model
.
RoleAuth
},
};
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
model
.
MId
));
}
...
...
@@ -78,15 +80,16 @@ namespace Edu.Module.User
}
/// <summary>
///
删除管理者
///
修改管理者状态
/// </summary>
/// <param name="MId"></param>
/// <param name="Status"></param>
/// <returns></returns>
public
bool
RemoveManagerModule
(
int
MId
)
public
bool
RemoveManagerModule
(
int
MId
,
int
Status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Manager_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Delete
}
{
nameof
(
RB_Manager_ViewModel
.
Status
),
Status
}
};
bool
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
MId
));
return
flag
;
...
...
Edu.Module.User/StudentModule.cs
View file @
23b6e35f
...
...
@@ -125,16 +125,17 @@ namespace Edu.Module.User
}
/// <summary>
///
删除学生
///
更新学生状态
/// </summary>
/// <param name="StuId"></param>
/// <param name="Status"></param>
/// <returns></returns>
public
bool
RemoveStudentModule
(
object
StuId
)
public
bool
RemoveStudentModule
(
object
StuId
,
int
Status
)
{
bool
flag
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Delete
},
{
nameof
(
RB_Student_ViewModel
.
Status
),
Status
},
};
flag
=
studentRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Student_ViewModel
.
StuId
),
StuId
));
return
flag
;
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
23b6e35f
...
...
@@ -558,14 +558,15 @@ namespace Edu.WebApi.Controllers.User
}
/// <summary>
///
删除学生
///
更新学生状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudent
()
{
var
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
);
var
flag
=
studentModule
.
RemoveStudentModule
(
StuId
);
int
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
);
var
flag
=
studentModule
.
RemoveStudentModule
(
StuId
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -666,7 +667,8 @@ namespace Edu.WebApi.Controllers.User
public
ApiResult
RemoveManager
()
{
var
MId
=
base
.
ParmJObj
.
GetInt
(
"MId"
,
0
);
var
flag
=
managerModule
.
RemoveManagerModule
(
MId
);
int
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
);
var
flag
=
managerModule
.
RemoveManagerModule
(
MId
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
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