Commit 23b6e35f authored by 黄奎's avatar 黄奎

页面修改

parent 66fb44d5
...@@ -66,5 +66,9 @@ namespace Edu.Model.Entity.User ...@@ -66,5 +66,9 @@ namespace Edu.Model.Entity.User
/// </summary> /// </summary>
public DateStateEnum Status { get; set; } public DateStateEnum Status { get; set; }
/// <summary>
/// 角色列表
/// </summary>
public string RoleAuth { get; set; }
} }
} }
...@@ -54,7 +54,9 @@ namespace Edu.Module.User ...@@ -54,7 +54,9 @@ namespace Edu.Module.User
{ nameof(RB_Manager_ViewModel.MName),model.MName.Trim()}, { nameof(RB_Manager_ViewModel.MName),model.MName.Trim()},
{ nameof(RB_Manager_ViewModel.MTel),model.MTel.Trim()}, { nameof(RB_Manager_ViewModel.MTel),model.MTel.Trim()},
{ nameof(RB_Manager_ViewModel.MHead),model.MHead }, { 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.UpdateTime),model.UpdateTime },
{ nameof(RB_Manager_ViewModel.RoleAuth),model.RoleAuth },
}; };
flag = managerRepository.Update(fileds, new WhereHelper(nameof(RB_Manager_ViewModel.MId), model.MId)); flag = managerRepository.Update(fileds, new WhereHelper(nameof(RB_Manager_ViewModel.MId), model.MId));
} }
...@@ -78,15 +80,16 @@ namespace Edu.Module.User ...@@ -78,15 +80,16 @@ namespace Edu.Module.User
} }
/// <summary> /// <summary>
/// 删除管理者 /// 修改管理者状态
/// </summary> /// </summary>
/// <param name="MId"></param> /// <param name="MId"></param>
/// <param name="Status"></param>
/// <returns></returns> /// <returns></returns>
public bool RemoveManagerModule(int MId) public bool RemoveManagerModule(int MId,int Status)
{ {
Dictionary<string, object> fileds = new Dictionary<string, object>() 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)); bool flag = managerRepository.Update(fileds, new WhereHelper(nameof(RB_Manager_ViewModel.MId), MId));
return flag; return flag;
......
...@@ -125,16 +125,17 @@ namespace Edu.Module.User ...@@ -125,16 +125,17 @@ namespace Edu.Module.User
} }
/// <summary> /// <summary>
/// 删除学生 /// 更新学生状态
/// </summary> /// </summary>
/// <param name="StuId"></param> /// <param name="StuId"></param>
/// <param name="Status"></param>
/// <returns></returns> /// <returns></returns>
public bool RemoveStudentModule(object StuId) public bool RemoveStudentModule(object StuId,int Status)
{ {
bool flag; bool flag;
Dictionary<string, object> fileds = new Dictionary<string, object>() 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)); flag = studentRepository.Update(fileds, new WhereHelper(nameof(RB_Student_ViewModel.StuId), StuId));
return flag; return flag;
......
...@@ -558,14 +558,15 @@ namespace Edu.WebApi.Controllers.User ...@@ -558,14 +558,15 @@ namespace Edu.WebApi.Controllers.User
} }
/// <summary> /// <summary>
/// 删除学生 /// 更新学生状态
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public ApiResult RemoveStudent() public ApiResult RemoveStudent()
{ {
var StuId = base.ParmJObj.GetInt("StuId", 0); 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(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -666,7 +667,8 @@ namespace Edu.WebApi.Controllers.User ...@@ -666,7 +667,8 @@ namespace Edu.WebApi.Controllers.User
public ApiResult RemoveManager() public ApiResult RemoveManager()
{ {
var MId = base.ParmJObj.GetInt("MId", 0); 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(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
#endregion #endregion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment