using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using RecruitmentDAL.DTO.ManpowerBudget; using System; using System.Collections.Generic; using System.Data.Common; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace RecruitmentDAL.CustomeCode.ManpowerBudget { public interface IManpowerBudgetDAL { Task GetManpowerBudget(int ManpowerBudgetId, LoginDTO LoginDTO, CancellationToken ct); Task GetSelectListManpowerBudget(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, CancellationToken ct); // Resolution lookup for JobRequisitionBLL.ApproveJobRequisition's budget-gate check — see // ManpowerBudgetQB.GET_ACTIVE_MANPOWERBUDGET_FOR_DEPARTMENT_PERIOD. Task GetActiveManpowerBudgetForDepartmentPeriod(int DepartmentId, short FiscalYear, byte FiscalQuarter, LoginDTO LoginDTO, CancellationToken ct); // Transactional write overloads — called from BaseEntityAppService.ExecuteSaveAsync's // persistFunc so the save participates in the single pipeline transaction. Task SaveManpowerBudget(ManpowerBudgetDTO ManpowerBudgetDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task UpdateManpowerBudget(ManpowerBudgetDTO ManpowerBudgetDTO, LoginDTO LoginDTO, DbTransaction tx, CancellationToken ct); Task DeleteManpowerBudget(int ManpowerBudgetId, LoginDTO LoginDTO, CancellationToken ct); // Standalone, non-transactional follow-up update fired from // JobRequisitionBLL.ApproveJobRequisition — see ManpowerBudgetQB.INCREMENT_MANPOWERBUDGET_CONSUMED // doc comment for why this is not folded into JobRequisition's own ExecuteSaveAsync transaction. Task IncrementManpowerBudgetConsumed(int ManpowerBudgetId, short HeadcountDelta, decimal BudgetAmountDelta, LoginDTO LoginDTO, CancellationToken ct); } }