public Task <IEnumerable <OutStandingDetail> > LoadOutStandingListByParty(RequestOutStandingDetail objRequest) { var outstanding = _outStandingQueryRepository.GetOutstandingListByParty(objRequest); return(outstanding); }
public async Task <IEnumerable <OutStandingDetail> > GetOutstandingListByParty(RequestOutStandingDetail 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("@CityName", string.Empty, DbType.String); param.Add("@SCode", objOutStanding.partyId == -1 ? 0 : objOutStanding.partyId, DbType.Int32); param.Add("@AgCode", objOutStanding.agentId == -1 ? 0 : objOutStanding.agentId, DbType.Int32); param.Add("@PaidUnPaid", 0, DbType.Int32); param.Add("@Option", 0, DbType.Int32); var result = await connection.QueryAsync <POutStandingDetail>("[dbo].[SPONLINESalesOutstandingDetail]", param, commandType : CommandType.StoredProcedure, commandTimeout : 0); return(MapOutStandingItemListByParty(result.AsList())); } } catch (Exception ex) { throw ex; } }