using FrameworkDAL.CustomCode.DocumentType; using FrameworkDAL.DTO.DocumentType; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; namespace FrameworkBLL.DocumentType { public class DocumentTypeBLL : IDocumentTypeBLL { private readonly IDocumentTypeDAL _documentTypeDAL; public DocumentTypeBLL(IDocumentTypeDAL documentTypeDAL) { _documentTypeDAL = documentTypeDAL; } public async Task GetDocumentType(int DocumentTypeId, LoginDTO LoginDTO) { try { return await _documentTypeDAL.GetDocumentType(DocumentTypeId, LoginDTO); } catch (Exception) { throw; } } /// /// Retrieves a paginated list of DocumentType records based on specified filter criteria. /// Can optionally return the total count of records instead of the list. /// /// The starting index of records to fetch (for pagination). /// The maximum number of records to fetch. /// Filter criteria for selecting DocumentType. /// The current user's login details. /// If true, returns the total count of matching records instead of the list. /// A JSON string representing either the list of DocumentType records or the total count. public async Task GetSelectListDocumentType(int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO LoginDTO, bool isCount = false) { try { return await _documentTypeDAL.GetSelectListDocumentType(firstNumber, maxResult, criteriaDTO, LoginDTO); } catch (Exception) { throw; } } /// /// Deletes a DocumentType record by its unique identifier. /// public async Task DeleteDocumentType(int DocumentTypeId, LoginDTO LoginDTO) { try { return await _documentTypeDAL.DeleteDocumentType(DocumentTypeId, LoginDTO); } catch (Exception) { throw; } } } }