40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using _0_Framework.Application;
|
|
using CompanyManagment.App.Contracts.Employee;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using ServiceHost.BaseControllers;
|
|
|
|
namespace ServiceHost.Areas.Admin.Controllers;
|
|
|
|
public class EmployeesController:AdminBaseController
|
|
{
|
|
private readonly IEmployeeApplication _employeeApplication;
|
|
private readonly IAuthHelper _authHelper;
|
|
public EmployeesController(IEmployeeApplication employeeApplication, IAuthHelper authHelper)
|
|
{
|
|
_employeeApplication = employeeApplication;
|
|
_authHelper = authHelper;
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// لیست پرسنل برای جستجو
|
|
/// </summary>
|
|
/// <param name="search"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("select_list")]
|
|
public async Task<ActionResult<List<EmployeeSelectListViewModel>>> GetSelectList(string search)
|
|
{
|
|
var data = await _employeeApplication.GetSelectList(search);
|
|
|
|
return data;
|
|
}
|
|
|
|
[HttpGet]
|
|
public async Task<ActionResult<List<GetEmployeeListViewModel>>> GetList(GetEmployeeListSearchModel searchModel)
|
|
{
|
|
var result = await _employeeApplication.GetList(searchModel);
|
|
|
|
return result;
|
|
}
|
|
} |