While the query may work in your SQL IDE, is that taking into consideration this
if...then
clause?
using (var reader = cmd.ExecuteReader())
{
while (reader.Read())
{
if (!DBNull.Value.Equals(reader[2]))
{
list.Add(new PendingModel()
You may want to run this query through you the MySQL Workbench
SELECT lname, IRG, IRGDate
FROM proposal
LEFT JOIN pendingproposals USING(proposal_id)
LEFT JOIN proposal_research_team USING(proposal_id)
WHERE proposal.status in (
'Unsubmitted',
'Dept Approval In Process',
'Admin Office In Process',
'JIT Request Received',
'JIT Submitted',
'Submitted to Sponsor',
'Sub 1/4: Awaiting Agreement',
'Sub 2/4: Under Negotiation',
'Sub 3/4: Partially Executed' )
AND role = 'Lead Principal Investigator'
AND IRGDate IS NOT NULL;