using FrameworkDAL.DTO.GBPeriod; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FrameworkBLL.GBPeriod { public interface IGBPeriodBLL { Task GetGBPeriod(int gbPeriodId, LoginDTO loginDTO); /// /// Inserts a new GBPeriod record or updates an existing one. /// Applies business rules such as auto-number assignment for new records. /// /// The GBPeriod data to save or update. /// The current user's login details. /// A message string indicating success and the GBPeriod ID. Task SaveGBPeriod(GBPeriodDTO GBPeriodDTO, LoginDTO LoginDTO); /// /// Deletes a GBPeriod record by its unique identifier. /// /// The ID of the GBPeriod to delete. /// The current user's login details. /// A message string indicating success or failure of the delete operation. Task DeleteGBPeriod(int GBPeriodId, LoginDTO LoginDTO); /// /// Retrieves a paginated list of GBPeriod 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 GBPeriod records. /// 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 GBPeriod records or the total count. Task GetSelectListGBPeriod(int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO loginDTO, bool isCount = false); /// /// Retrieves a paginated list of GBPeriodDetail records (sub-periods) across all GBPeriods. /// 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 GBPeriodDetail records. /// 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 GBPeriodDetail records or the total count. Task GetSelectListGBPeriodDetail(int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO loginDTO, bool isCount = false); /// /// Retrieves the full GBPeriod/GBPeriodDetail picklist (no paging) filtered by the supplied criteria. /// Mirrors the GB4 Gb4PeriodPicklist behavior used by legacy period-selection pickers. /// /// Filter criteria (e.g. PeriodType, SubPeriodName, PeiodFromDate, PeiodToDate). /// The current user's login details. /// A JSON string representing the list of matching GBPeriodDetail picklist records. Task Gb4PeriodPicklist(CriteriaDTO criteriaDTO, LoginDTO loginDTO); } }