Exemplo n.º 1
0
def get_new_donor():
        donor_datas = Donor()
        donor_datas.name = donor_register_get_user_data.get_name_string()
        donor_datas.weight = donor_register_get_user_data.get_weight_string()
        donor_datas.gender = donor_register_get_user_data.get_gender_string()
        donor_datas.birth_date = donor_register_get_user_data.get_birth_date()
        donor_datas.last_donation = donor_register_get_user_data.get_last_donation_date()
        donor_datas.was_sick_last_month = donor_register_get_user_data.get_sick_response_string()
        donor_datas.identifier = donor_register_get_user_data.get_unique_indentifier_string()
        donor_datas.id_expire = donor_register_get_user_data.get_id_expiration_date()
        donor_datas.blood_type = donor_register_get_user_data.get_donor_blood_type_string()
        donor_datas.e_mail = donor_register_get_user_data.get_email_string()
        donor_datas.mobile_number = donor_register_get_user_data.get_mobile_string()
        return donor_datas
Exemplo n.º 2
0
Switch = True

while Switch:
    print("""
    1 = donor registration
    2 = donor event registration
    x = exit
    """)
    Answer = input("Answer: ")
    if Answer == "1":
        donor_datas = Donor()
        donor_datas.name = donor_register_get_user_data.get_name_string()
        donor_datas.weight = donor_register_get_user_data.get_weight_string()
        donor_datas.gender = donor_register_get_user_data.get_gender_string()
        donor_datas.birth_date = donor_register_get_user_data.get_birth_date()
        donor_datas.last_donation = donor_register_get_user_data.get_last_donation_date()
        donor_datas.was_sick_last_month = donor_register_get_user_data.get_sick_response_string()
        donor_datas.identifier = donor_register_get_user_data.get_unique_indentifier_string()
        donor_datas.id_expire = donor_register_get_user_data.get_id_expiration_date()
        donor_datas.blood_type = donor_register_get_user_data.get_donor_blood_type_string()
        donor_datas.e_mail = donor_register_get_user_data.get_email_string()
        donor_datas.mobile_number = donor_register_get_user_data.get_mobile_string()
        print(donor_datas.__repr__())
        sleep(15)
        os.system('cls' if os.name == 'nt' else 'clear')



    elif Answer == "2":
        donation_event_actual = DonationEvent()
        donation_event_actual.date_of_event_string = donation_event_reg.get_date_of_event_string()