using System.Data.Common; using AccountsDAL.DTO.Account; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using GB5Shared.ResponseStandard; namespace AccountsDAL.CustomCode.Account { public interface IAccountDAL { Task GetAccount(int AccountId, LoginDTO LoginDTO); Task GetSelectListAccount(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, bool IsCount = false); Task GetAccountList(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO); Task GetAccountParameter(int AccountId, LoginDTO LoginDTO); // Usage checks — called before delete Task AccountExistsInVouchers(int accountId, LoginDTO loginDTO); Task AccountLinkedToParty(int accountId, LoginDTO loginDTO); // Existence check for the Party<->Account shadow-account link (AccountId == PartyId) Task AccountExists(int accountId, LoginDTO loginDTO, DbTransaction tx); // Transactional write overloads — called from ExecuteSaveAsync callback Task> SaveAccount(AccountDTO dto, LoginDTO loginDTO, DbTransaction tx); Task> UpdateAccount(AccountDTO dto, LoginDTO loginDTO, DbTransaction tx); Task> DeleteAccount(int accountId, LoginDTO loginDTO, DbTransaction tx); // Additional read queries Task GetAccountDetailsSQL(int accountId, LoginDTO loginDTO); Task GetAccountPicklistForAccountPopup(CriteriaDTO criteriaDTO, LoginDTO loginDTO); Task GetSelectListAccountVsCompany(int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO loginDTO); Task GetPopUpDetails(int accountId, LoginDTO loginDTO); Task GetControlAccountPicklist(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO); Task GetSelectListGeneralLedger(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO); Task GetAccountSelectlistFromQueryParametarized( int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO loginDTO); } }