refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.

This commit is contained in:
Developer 02
2024-08-01 18:44:39 +02:00
parent 0d82f7af6f
commit 62ddd4873f
206 changed files with 10927 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class AdWebAppToWebAppRoleController : BaseController<AdWebAppToWebAppRole>
{
public AdWebAppToWebAppRoleController(IBaseRepository<AdWebAppToWebAppRole> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class CostCentreController : BaseController<CostCentre>
{
public CostCentreController(IBaseRepository<CostCentre> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,54 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class DepartmentController : BaseController<Department>
{
public DepartmentController(IBaseRepository<Department> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("DepartmentFullFilter")]
public async Task<IActionResult> GetDepartmentListAsync([FromBody] DepartmentFullFilter filter)
{
try
{
var list = await ((DepartmentRepository)EntityRepository).GetDepartmentListAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(Employee).Name}");
}
}
[HttpPut("CopyWindreamTiles/{DepartmentId}")]
public async Task<IActionResult> GetVisitorListAsync(int DepartmentId, [FromBody] List<int> trgDepartmentIds)
{
var strTrgDepartmentIds = string.Join(",", trgDepartmentIds);
try
{
await ((DepartmentRepository)EntityRepository).ReplaceWindreamTiles(DepartmentId, strTrgDepartmentIds);
this.WriteLogWarn($"Windream Search Tiles from Department Id={DepartmentId} are replaced Tiles in the Departments with Ids={strTrgDepartmentIds}");
return new OkObjectResult(true);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Windream Search Tiles from Department Id={DepartmentId} cann't replace Tiles in the Departments with Ids={strTrgDepartmentIds}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class DepartmentToWebAppToEmployeeForWindreamController : BaseController<DepartmentToWebAppToEmployeeForWindream>
{
public DepartmentToWebAppToEmployeeForWindreamController(IBaseRepository<DepartmentToWebAppToEmployeeForWindream> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeFilter")]
public async Task<IActionResult> GetDepartmentToWebAppToEmployeeForWindreamListAsync([FromBody] EmployeeFilter filter)
{
try
{
var list = await ((DepartmentToWebAppToEmployeeForWindreamRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(DepartmentToWebAppToEmployeeForWindream).Name}");
}
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class DocumentArtController : BaseController<DocumentArt>
{
public DocumentArtController(IBaseRepository<DocumentArt> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class DocumentArtToDepartmentController : BaseController<DocumentArtToDepartment>
{
public DocumentArtToDepartmentController(IBaseRepository<DocumentArtToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("DepartmentFilter")]
public async Task<IActionResult> GetDocumentArtToDepartmentListAsync([FromBody] DepartmentFilter filter)
{
try
{
var list = await ((DocumentArtToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(DocumentArtToDepartment).Name}");
}
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class EmployeeAttributeController : BaseController<EmployeeAttribute>
{
public EmployeeAttributeController(IBaseRepository<EmployeeAttribute> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class EmployeeController : BaseController<Employee>
{
public EmployeeController(IBaseRepository<Employee> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeFullFilter")]
public async Task<IActionResult> GetEmployeeListAsync([FromBody] EmployeeFullFilter filter)
{
try
{
var list = await ((EmployeeRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(Employee).Name}");
}
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class EmployeeStatusController : BaseController<EmployeeStatus>
{
public EmployeeStatusController(IBaseRepository<EmployeeStatus> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class EmployeeToAttributeController : BaseController<EmployeeToAttribute>
{
public EmployeeToAttributeController(IBaseRepository<EmployeeToAttribute> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeFilter")]
public async Task<IActionResult> GetEmployeeToAttributeListAsync([FromBody] EmployeeFilter filter)
{
try
{
var list = await ((EmployeeToAttributeRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(EmployeeToAttribute).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class EmployeeToDepartmentController : BaseController<EmployeeToDepartment>
{
public EmployeeToDepartmentController(IBaseRepository<EmployeeToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeFilter")]
public async Task<IActionResult> GetEmployeeToDepartmentListAsync([FromBody] EmployeeFilter filter)
{
try
{
var list = await ((EmployeeToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(EmployeeToDepartment).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class EmployeeToWebAppController : BaseController<EmployeeToWebApp>
{
public EmployeeToWebAppController(IBaseRepository<EmployeeToWebApp> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeFilter")]
public async Task<IActionResult> GetEmployeeToWebAppListAsync([FromBody] EmployeeFilter filter)
{
try
{
var list = await ((EmployeeToWebAppRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(EmployeeToWebApp).Name}");
}
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class ProjectController : BaseController<Project>
{
public ProjectController(IBaseRepository<Project> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class RangController : BaseController<Rang>
{
public RangController(IBaseRepository<Rang> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class SubsidiaryController : BaseController<Subsidiary>
{
public SubsidiaryController(IBaseRepository<Subsidiary> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WebAppAdditionalRoleController : BaseController<WebAppAdditionalRole>
{
public WebAppAdditionalRoleController(IBaseRepository<WebAppAdditionalRole> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("WebAppFilter")]
public async Task<IActionResult> GetWebAppAdditionalRoleListAsync([FromBody] WebAppFilter filter)
{
try
{
var list = await ((WebAppAdditionalRoleRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WebAppAdditionalRole).Name}");
}
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WebAppController : BaseController<WebApp>
{
public WebAppController(IBaseRepository<WebApp> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,15 @@
using DAL.Models.Entities;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WebAppRoleController : BaseController<WebAppRole>
{
public WebAppRoleController(IBaseRepository<WebAppRole> repositoryBase) : base(repositoryBase)
{
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WebAppToDepartmentController : BaseController<WebAppToDepartment>
{
public WebAppToDepartmentController(IBaseRepository<WebAppToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeToWebAppFilter")]
public async Task<IActionResult> GetWebAppToDepartmentListAsync([FromBody] EmployeeToWebAppFilter filter)
{
try
{
var list = await ((WebAppToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WebAppToDepartment).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WebAppToWebAppAdditionalRoleController : BaseController<WebAppToWebAppAdditionalRole>
{
public WebAppToWebAppAdditionalRoleController(IBaseRepository<WebAppToWebAppAdditionalRole> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("EmployeeToWebAppFilter")]
public async Task<IActionResult> GetWebAppToWebAppAdditionalRoleListAsync([FromBody] EmployeeToWebAppFilter filter)
{
try
{
var list = await ((WebAppToWebAppAdditionalRoleRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WebAppToWebAppAdditionalRole).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WebAppToWebAppRoleController : BaseController<WebAppToWebAppRole>
{
public WebAppToWebAppRoleController(IBaseRepository<WebAppToWebAppRole> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("WebAppFilter")]
public async Task<IActionResult> GetWebAppToWebAppRoleListAsync([FromBody] WebAppFilter filter)
{
try
{
var list = await ((WebAppToWebAppRoleRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WebAppToWebAppRole).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamColumnsToDepartmentController : BaseController<WindreamColumnsToDepartment>
{
public WindreamColumnsToDepartmentController(IBaseRepository<WindreamColumnsToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("DepartmentFilter")]
public async Task<IActionResult> GetWindreamColumnsToDepartmentListAsync([FromBody] DepartmentFilter filter)
{
try
{
var list = await ((WindreamColumnsToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamColumnsToDepartment).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamIndexController : BaseController<WindreamIndex>
{
public WindreamIndexController(IBaseRepository<WindreamIndex> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("ClientIdFilter")]
public async Task<IActionResult> GetWindreamIndexListAsync([FromBody] ClientIdFilter filter)
{
try
{
var list = await ((WindreamIndexRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamIndex).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamIndexToWindreamSearchToDepartmentController : BaseController<WindreamIndexToWindreamSearchToDepartment>
{
public WindreamIndexToWindreamSearchToDepartmentController(IBaseRepository<WindreamIndexToWindreamSearchToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("WindreamSearchToDepartmentFilter")]
public async Task<IActionResult> GetWindreamIndexToWindreamSearchToDepartmentListAsync([FromBody] WindreamSearchToDepartmentFilter filter)
{
try
{
var list = await ((WindreamIndexToWindreamSearchToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamIndexToWindreamSearchToDepartment).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamInputFolderController : BaseController<WindreamInputFolder>
{
public WindreamInputFolderController(IBaseRepository<WindreamInputFolder> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("WindreamInputFolderFilter")]
public async Task<IActionResult> GetWindreamInputFolderListAsync([FromBody] WindreamInputFolderFilter filter)
{
try
{
var list = await ((WindreamInputFolderRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamInputFolder).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamSearchController : BaseController<WindreamSearch>
{
public WindreamSearchController(IBaseRepository<WindreamSearch> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("ClientIdFilter")]
public async Task<IActionResult> GetWindreamSearchListAsync([FromBody] ClientIdFilter filter)
{
try
{
var list = await ((WindreamSearchRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamSearch).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamSearchItemController : BaseController<WindreamSearchItem>
{
public WindreamSearchItemController(IBaseRepository<WindreamSearchItem> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("ClientIdFilter")]
public async Task<IActionResult> GetWindreamSearchItemListAsync([FromBody] ClientIdFilter filter)
{
try
{
var list = await ((WindreamSearchItemRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamSearchItem).Name}");
}
}
}
}

View File

@@ -0,0 +1,36 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamSearchItemToWindreamSearchToDepartmentController : BaseController<WindreamSearchItemToWindreamSearchToDepartment>
{
public WindreamSearchItemToWindreamSearchToDepartmentController(IBaseRepository<WindreamSearchItemToWindreamSearchToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("WindreamSearchToDepartmentFilter")]
public async Task<IActionResult> GetWindreamSearchItemToWindreamSearchToDepartmentListAsync([FromBody] WindreamSearchToDepartmentFilter filter)
{
try
{
var list = await ((WindreamSearchItemToWindreamSearchToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamSearchItemToWindreamSearchToDepartment).Name}");
}
}
}
}

View File

@@ -0,0 +1,54 @@
using DAL.Models.Entities;
using DAL.Models.Filters;
using DAL.Repositories;
using HRD.LDAPService.JWT;
using HRD.WebApi.Controllers;
using HRD.WebApi.Repositories;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace StaffDBServer.Controllers
{
[JWTAuthorize]
public class WindreamSearchToDepartmentController : BaseController<WindreamSearchToDepartment>
{
public WindreamSearchToDepartmentController(IBaseRepository<WindreamSearchToDepartment> repositoryBase) : base(repositoryBase)
{
}
[HttpPost("DepartmentFilter")]
public async Task<IActionResult> GetWindreamSearchToDepartmentListAsync([FromBody] DepartmentFilter filter)
{
try
{
var list = await ((WindreamSearchToDepartmentRepository)EntityRepository).GetListByFilterAsync(filter);
return new OkObjectResult(list);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't get the filtered list of {typeof(WindreamSearchToDepartment).Name}");
}
}
[HttpPut("CopyWindreamTile/{WindreamSearchToDepartmentId}")]
public async Task<IActionResult> GetVisitorListAsync(int WindreamSearchToDepartmentId, [FromBody] List<int> trgDepartmentIds)
{
var strTrgDepartmentIds = string.Join(",", trgDepartmentIds);
try
{
await ((WindreamSearchToDepartmentRepository)EntityRepository).AddWindreamTile(WindreamSearchToDepartmentId, strTrgDepartmentIds);
this.WriteLogWarn($"Windream Search Tile Id={WindreamSearchToDepartmentId} is added to Departments wit Ids={strTrgDepartmentIds}");
return new OkObjectResult(true);
}
catch (Exception ex)
{
this.WriteLogException(ex);
return StatusCode(StatusCodes.Status400BadRequest, $"Cann't add Windream Search Tile Id={WindreamSearchToDepartmentId} to Departments wit Ids={strTrgDepartmentIds}");
}
}
}
}