public
Created

  • Download Gist
gistfile1.cs
C#
1 2 3 4 5 6 7 8 9 10 11 12 13
//class Application {
public virtual void ReceivePaperVersion(DateTime sendDate,DateTime arrivalDate){
if(Statuses.ApplicationStatus!=ApplicationStatus.ReceivedElectronically)
throw new ApplicationException
("Paper version can be received only right after electronic version is received.");
var d=Call.ApplicationDeadlines;
if(sendDate>d.PaperVersionSendDeadline)
throw new ApplicationException("Send date exceeds call deadline");
if(arrivalDate>d.PaperVersionArrivalDeadline)
throw new ApplicationException("Arrival date exceeds call deadline");
PaperVersionDetails=new PaperVersionDetails(sendDate,arrivalDate);
Statuses.ApplicationStatus=ApplicationStatus.ReceivedFully;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.