Example #1
0
 public IActionResult GetPaginatedManagementByCustomer([FromBody] GetPaginatedManagementByCustomer request)
 {
     try
     {
         return(Ok(_unitOfWork.Management.ManagementByCustomerList(request.Page, request.Rows, request.IdCustomer, request.State)));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, "Internal server error: " + ex.Message));
     }
 }
Example #2
0
 public IActionResult GetManagementCreatedByUser([FromBody] GetPaginatedManagementByCustomer request)
 {
     try
     {
         string idUser             = User.Claims.Where(c => c.Type.Equals(ClaimTypes.PrimarySid)).FirstOrDefault().Value;
         List <ManagementList> lst = _unitOfWork.Management.ManagementCreatedByUserList(int.Parse(idUser), request.State).ToList();
         return(Ok(lst));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, "Internal server error: " + ex.Message));
     }
 }