BPM Posting rule

I am trying to make sure that 3 posting rules we have are working properly and I cannot get the AR Invc posting rule to work. Here is the code I have entered:
//PostGroupID
var InvcGrp_xRow = (from InvcGrp_Row in Db.InvcGrp
where InvcGrp_Row.GroupID == PostGroupID
select InvcGrp_Row).FirstOrDefault();
if(InvcGrp_xRow != null)
{
foreach(var InvcHead_iterator in (from InvcHead_Row in Db.InvcHead
where InvcHead_Row.GroupID == InvcGrp_xRow.GroupID &&
InvcHead_Row.EntryPerson == Session.UserID
select InvcHead_Row))
{
var InvcHeadx_Row = InvcHead_iterator;
if(InvcHeadx_Row != null)
{
throw new Ice.BLException(“You cannot post a group with your own invoice.”);
}
}
}
When I try to compile( Save) it, I get the following error:
Description: There is at least one compilation error.
Details:
Error CS1593: Delegate ‘System.Func<Erp.Tables.InvcGrp,int,bool>’ does not take 1 arguments [InvcGrp.PostInvoices.cs(118,12)]
Error CS1660: Cannot convert lambda expression to type ‘string’ because it is not a delegate type [InvcGrp.PostInvoices.cs(118,12)]
Error CS0103: The name ‘PostGroupID’ does not exist in the current context [InvcGrp.PostInvoices.cs(118,41)]
What am I missing? DO I have it in the wrong group or wrong Method? I have it set to “Erp.InvcGrp.PostInvoices”
There is something about the “PostGroupID” that is causing the problem. I’m sure it’s something simple I jut can’t see it.

Thanks,

Charles Dingas