public async Task <IEnumerable <OutStandingSummary> > GetOutstandingList(RequestOutStandingSummary objOutStanding) { try { using (var connection = new SqlConnection(_connectionString)) { connection.Open(); var param = new DynamicParameters(); param.Add("@CCode", objOutStanding.companyId == -1? 0: objOutStanding.companyId, DbType.Int32); param.Add("@D1", objOutStanding.date1, DbType.Date); param.Add("@D2", objOutStanding.date2, DbType.Date); param.Add("@SCode", objOutStanding.partyId == -1?0 : objOutStanding.partyId, DbType.Int32); param.Add("@AgCode", objOutStanding.agentId == -1 ? 0 :objOutStanding.agentId, DbType.Int32); var result = await connection.QueryAsync <POutStandingSummary>("[dbo].[SPONLINESalesOutstandingSummary]", param, commandType : CommandType.StoredProcedure, commandTimeout : 0); return(MapOutStandingItemList(result.AsList())); } } catch (Exception ex) { throw ex; } }
public Task <IEnumerable <OutStandingSummary> > LoadOutStandingList(RequestOutStandingSummary objRequest) { var outstanding = _outStandingQueryRepository.GetOutstandingList(objRequest); return(outstanding); }