public bool IsMatch(schemeType scheme, producerType producer, MemberUpload upload, string name) { Log.Information(string.Format("amendment calc {0}", name)); var year = int.Parse(scheme.complianceYear); var previousProducerSubmission = registeredProducerDataAccess.GetProducerRegistrationForInsert(producer.registrationNo, year, scheme.approvalNo, upload, name, producer); var result = producer.status == statusType.A && (previousProducerSubmission != null); if (result) { Log.Information(string.Format("amendment calc {0}", name)); } return(result); }
public bool IsMatch(schemeType scheme, producerType producer, MemberUpload upload, string name) { var year = int.Parse(scheme.complianceYear); var previousProducerSubmission = registeredProducerDataAccess.GetProducerRegistrationForInsert(producer.registrationNo, year, scheme.approvalNo, upload, name, producer); if (year > 2018) { if (producer.status == statusType.I) { Log.Information(string.Format("calc {0}", name)); return(true); } if (producer.status == statusType.A && previousProducerSubmission == null) { Log.Information(string.Format("calc {0}", name)); return(true); } } return(false); }