public bool UserWorksIsPaid(int idUser, IDriverDB driver) { decimal acceptedWorksByUser = driver.GetAmountAcceptedWorkByProjectAndUser(id, idUser); if (acceptedWorksByUser == 0) { return(true); } decimal paymentsByUser = driver.GetAmountPaymentsByUserAndProject(id, idUser); return(paymentsByUser >= acceptedWorksByUser); }
public decimal GetPaymentsAmountByProject(int idProject, IDriverDB driver) { return(driver.GetAmountPaymentsByUserAndProject(idProject, id)); }