Ejemplo n.º 1
0
        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 GetAmountAcceptedWorkByProject(int idProject, IDriverDB driver)
 {
     return(Decimal.Round(driver.GetAmountAcceptedWorkByProjectAndUser(idProject, id), 2));
 }