Example #1
0
void NouvelleLocation(Emprunteurs *Hash1, Vehicules *Hash2, Flotte *Hash3, Locations *Hash4){
    Location loc;
    int touche2, num;
    num = Hash4->GiveNumero();
    loc.NouvelleLocation(num, Hash1, Hash3);
    loc.PrintDevisFacture(Hash1, Hash2, Hash3);
    cout << "\nF1. Pour confirmer l'enregistrement. Sinon appuyez sur une touche pour continuer" << endl;
    touche2=getch();
    if (touche2==0 || touche2==224){
        touche2=getch();
        if (touche2==59){
            Hash4->EnregistrerLocation(loc);
            cout << "Enregistrement effectue" << endl;}
    }
    system("pause");
}
Example #2
0
void EditionDevisFactures(Emprunteurs *Hash1, Vehicules *Hash2, Flotte *Hash3, Locations *Hash4){
    int num, touche2;
    Location loc;
    system("cls");
    cout << "Entrez le numero de location:" << endl;
    while(!(cin >> num)) {//Saisie sécurisée pour un nombre
        cout << "Cette location n'existe pas ! (Le numero doit etre un nombre), Entrez le numero de location :" << endl ;
        cin.clear();
        cin.ignore( numeric_limits<streamsize>::max(), '\n' );
    }
    cin.clear();
    cin.ignore( numeric_limits<streamsize>::max(), '\n' );
    loc = Hash4->GetLocation(num);
    loc.PrintDevisFacture(Hash1, Hash2, Hash3);
    cout << "\nF1. Pour modifier le retour. Ou appuyez sur une touche pour continuer" << endl;
    touche2=getch();
    if (touche2==0 || touche2==224){
        touche2=getch();
        if (touche2==59){
            RetourDeLocation(Hash3, Hash4);
        }
    }

}