add new RoleType and validationPoint to AdminUser
This commit is contained in:
@@ -19,7 +19,7 @@ namespace CarParkValidationAPI.Repository
|
||||
{
|
||||
private DataContext _context;
|
||||
private string _currentUser = "";
|
||||
List<AdminUserDto> _resultList = new List<AdminUserDto>();
|
||||
List<AdminUserViewDto> _resultList = new List<AdminUserViewDto>();
|
||||
private readonly AppSettings _appSettings;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CarParkValidationAPI.Repository
|
||||
return model;
|
||||
}
|
||||
|
||||
public async Task<ResultModel<List<AdminUserDto>>> LoadAdminUserAsync(bool onlyActive)
|
||||
public async Task<ResultModel<List<AdminUserViewDto>>> LoadAdminUserAsync(bool onlyActive)
|
||||
{
|
||||
/*
|
||||
List<AdminUserDto> resultList = new List<AdminUserDto>();
|
||||
@@ -91,17 +91,17 @@ namespace CarParkValidationAPI.Repository
|
||||
*/
|
||||
for (int i =0; i < 10; i++)
|
||||
{
|
||||
AdminUserDto dto = new AdminUserDto();
|
||||
AdminUserViewDto dto = new AdminUserViewDto();
|
||||
dto.Id = i;
|
||||
dto.Name = $"Name {i}";
|
||||
dto.RoleType = AdminRole.Admin;
|
||||
dto.RoleType = AdminRole.Admin.ToString();
|
||||
dto.StafflinkNo = $"{i+40000}";
|
||||
dto.Active = true;
|
||||
dto.AddedOn = DateTime.Today.AddDays(i);
|
||||
dto.AddedBy = "ddfed";
|
||||
_resultList.Add(dto);
|
||||
}
|
||||
return new ResultModel<List<AdminUserDto>>()
|
||||
return new ResultModel<List<AdminUserViewDto>>()
|
||||
{
|
||||
Data = _resultList,
|
||||
StatusCode = 1
|
||||
@@ -125,11 +125,7 @@ namespace CarParkValidationAPI.Repository
|
||||
throw ex;
|
||||
}
|
||||
*/
|
||||
int idx = _resultList.FindIndex(x => x.Id == id);
|
||||
if (idx > -1)
|
||||
{
|
||||
result = _resultList[idx];
|
||||
}
|
||||
|
||||
|
||||
return new ResultModel<AdminUserDto>()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user