using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CostingDAL.DTO.ResourceType; using CostingDAL.Query.Resource; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using GB5Shared.QueryExecutor; using GB5Shared.Validation; using Newtonsoft.Json; namespace CostingDAL.CustomCode.Resource { public class ResourceDAL : IResourceDAL { private readonly IQueryExecutor _QueryExecutor; private readonly IValidation _Validation; public ResourceDAL(IQueryExecutor IQueryExecutor, IValidation Validation) { _QueryExecutor = IQueryExecutor; _Validation = Validation; } public async Task GetSelectListResource(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO) { try { string SQL = ResourceQB.GET_SELECTLIST_RESOURCE; var Result = await _QueryExecutor.QueryAsync(LoginDTO, SQL, null!); string Json = JsonConvert.SerializeObject(Result); return Json; } catch (Exception) { throw; } } } }