Exemplo n.º 1
0
        public static bool IndividualIsValid(Individual individual)
        {
            if (!NameIsValid(individual.IndividualName))
            {
                return(false);
            }

            if (!CPFIsValid(individual.IndividualCPF))
            {
                return(false);
            }

            if (!EmailIsValid(individual.IndividualEmail))
            {
                return(false);
            }

            if (!RGIsValid(individual.IndividualRG))
            {
                return(false);
            }

            if (!ValidationsHelper.DateIsValid(individual.IndividualBirthdate))
            {
                return(false);
            }

            return(true);
        }
 /// <summary>
 /// Verifies if Pet is valid
 /// </summary>
 /// <param name="pet">Pet to be verified</param>
 /// <returns>If Pet is valid</returns>
 public static bool PetIsValid(Pet pet)
 {
     if (!ValidationsHelper.DateIsValid(pet.PetBirthdate))
     {
         return(false);
     }
     return(true);
 }
        /// <summary>
        /// Verifies if Mobile Device is valid
        /// </summary>
        /// <param name="mobileDevice">Mobile Device to be verified</param>
        /// <returns>If Mobile Device is valid</returns>
        public static bool MobileDeviceIsValid(MobileDevice mobileDevice)
        {
            if (!ValidationsHelper.DateIsValid(mobileDevice.MobileDeviceManufactoringYear))
            {
                return(false);
            }

            if (mobileDevice.MobileDeviceInvoiceValue <= 0)
            {
                return(false);
            }

            return(true);
        }
        public static bool RealtyIsValid(Realty realty)
        {
            if (realty.RealtyMarketValue < 0 && realty.RealtySaleValue < 0)
            {
                return(false);
            }

            //if (!CEPIsValid(realty.RealtyAddress.AddressZipCode))
            //    return false;

            if (!ValidationsHelper.DateIsValid(realty.RealtyConstructionDate))
            {
                return(false);
            }

            return(true);
        }
        public static bool VehicleIsValid(Vehicle vehicle)
        {
            if (!ValidationsHelper.DateIsValid(vehicle.VehicleManufactoringYear))
            {
                return(false);
            }

            if (!ValidationsHelper.DateIsValid(vehicle.VehicleModelYear))
            {
                return(false);
            }

            if (vehicle.VehicleCurrentFipeValue < 0 && vehicle.VehicleCurrentMileage <= 0)
            {
                return(false);
            }

            return(true);
        }