public PensionerModel Booking(RegisterModel regModel)
        {
            PensionerModel userModel = new PensionerModel
            {
                FirstName   = regModel.FirstName,
                LastName    = regModel.LastName,
                Email       = regModel.Email,
                PhoneNumber = regModel.PhoneNumber,
                BirthDate   = regModel.BirthYear
            };

            return(userModel);
        }
        public bool CheckAge(RegisterModel regModel)
        {
            PensionerModel pensioner = new PensionerModel();


            regModel.Age = regModel.GetAge(regModel);

            if (regModel.Age >= pensioner.GetAgeMinimum() && regModel.Age <= pensioner.GetAgeMaximum())
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #3
0
 public void ServicePensioner(PensionerModel pensioner, ServiceModel service)
 {
     PensionerRepository.InsertBookingresult(service, pensioner);
 }