Skip to content

Instantly share code, notes, and snippets.

@Mirabis
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mirabis/dea27a2a90b26fdd7e7a to your computer and use it in GitHub Desktop.
Save Mirabis/dea27a2a90b26fdd7e7a to your computer and use it in GitHub Desktop.
public bool CanBuyMouse(User _user)
{
if (_user.Level > 13)
{ // Require approval
return ApprovalSystem.Approve(_user, producttype: mouse)
}
else if(_user.Level.Between(12,3))
{ // Below €50,- month
return _user.expenses < 50.00;
}
else
{ // Below €5000,- month
return _user.expenses < 5000.00;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment