private string Pledge(string code, EmailQueueTo emailqueueto)
{
var match = pledgeRe.Match(code);
if (!match.Success)
return code;
var type = match.Groups["type"].Value;
var fundid = match.Groups["fundid"].Value.ToInt();
var pi = GetPledgeInfo(fundid, emailqueueto);
if (pi == null)
return "";
switch (type.ToLower())
{
case "bal":
return (pi.Balance ?? 0).ToString("c");
case "amt":
return (pi.PledgeAmt ?? 0).ToString("c");
}
return code;
}