C# Delete Attachments - Compile Errors

I’m trying to write some code that will delete all of the attachments on a PO line when the part number is changed. The syntax in the editor checks out, but I’m getting the below error when trying to save.
Not sure where these compile errors are coming from. Any ideas?

Trace Log:

        <tracePacket>
          <businessObject>Ice.Proxy.BO.AttachmentImpl</businessObject>
          <methodName>GetPathReferences</methodName>
          <appServerUri>net.tcp://isiepicor/PILOT/</appServerUri>
          <returnType>Ice.Tablesets.XFileAttchListTableset</returnType>
          <localTime>5/16/2018 09:15:07:9118437 AM</localTime>
          <executionTime total="13" roundTrip="12" channel="0" bpm="0" other="1" />
          <retries>0</retries>
          <parameters>
            <parameter name="path" type="System.String"><![CDATA[\\ISIMKE\users\awillett\Epicor Files\RDD\RDD95925SOPickLv4.040918.xml]]></parameter>
          </parameters>
        </tracePacket>

        <tracePacket>
          <businessObject>Erp.Proxy.BO.POImpl</businessObject>
          <methodName>Update</methodName>
          <appServerUri>net.tcp://isiepicor/PILOT/</appServerUri>
          <returnType>System.Void</returnType>
          <localTime>5/16/2018 09:15:07:9320991 AM</localTime>
          <executionTime total="47" roundTrip="33" channel="0" bpm="0" other="14" />
          <retries>0</retries>
          <parameters>
            <parameter name="ds" type="Erp.BO.PODataSet">
              <PODataSet xmlns="http://www.epicor.com/Ice/300/BO/PO/PO" />
            </parameter>
          </parameters>
          <paramDataSetChanges>
            <paramDataSet name="ds" useDataSetNbr="0">
              <deletedRow tableName="PODetailAttch" rowState="Deleted" rowNum="6" />
            </paramDataSet>
          </paramDataSetChanges>
        </tracePacket>

Code:

        var ttPODetailR = ttPODetail.FirstOrDefault(r=>r.Updated());
        const string RELATEDTYPE = "PODetail";
        const string RELATEDSCHEMA = "Erp";
        int iter = 0;

        if( ttPODetailR != null )
        {
           string strPNum = ttPODetailR.PONUM.ToString();
           int pNum = (int)ttPODetailR.PONUM;
           string strPLine = ttPODetailR.POLine.ToString();
           int pLine = (int)ttPODetailR.POLine;

           var count = (
              from xa in Db.XFileAttch.With(LockHint.NoLock)
              where xa.Company==Session.CompanyID &&
                       xa.RelatedToFile==RELATEDTYPE &&
                       xa.RelatedToSchemaName==RELATEDSCHEMA &&
                       xa.Key1==strPNum
              select xa.AttachNum).Count();

           if( count > 0 )
           {
              using( var poBO = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.POSvcContract>(Db))
              {
                 POTableset poTS = new POTableset();
                 poTS = poBO.GetByID(pNum);
                 while( iter < count )
                 {
                    if( poTS.PODetailAttch[iter].POLine == pLine )
                    {
                       poTS.PODetailAttch[iter].RowMod = "D";
                    }
                    iter++;
                 }
                 poBO.Update(ref poTS);
              }
           }
        }

Error:

Nevermind, spaced out.
It was in my condition block before the code even hits.
I just assumed it was my code. :expressionless:
Carry on.