Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agrego comprobaciones de DNI a la alta de empleados #3

Merged
merged 1 commit into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bin/Debug/tmphotel.exe
Binary file not shown.
317 changes: 212 additions & 105 deletions empleados.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion empleados.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typedef struct {

///PROTOTIPADOS///
stEmpleado alta1Empleado();
int altaEmpleados(stEmpleado A[], int dimension);
int altaEmpleados(stEmpleado A[], int dimension, int DNITemporal);
void listar1Empleado (stEmpleado A);
void listarEmpleados(stEmpleado A[], int validos);
void cargar1EmpleadoEnArchivo(stEmpleado A, const char *nombreArchivo);
Expand Down
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "linkdepago.h"
#include "botellas.h"
#include "empleados.h"
#include "preguntarDNI.h"

void inicioSesion();
void limpiarPantalla();
Expand Down
Binary file modified obj/Debug/empleados.o
Binary file not shown.
Binary file modified obj/Debug/main.o
Binary file not shown.
Binary file modified obj/Debug/reservas.o
Binary file not shown.
16 changes: 2 additions & 14 deletions reservas.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string.h>
#include "tiempo.h"
#include "reservas.h"
#include "preguntarDNI.h"

const char arHuespedes[] = "datosPersonas.dat";

Expand Down Expand Up @@ -100,19 +101,6 @@ int menuReservas()
return 0;
}

int preguntarDNI()
{
int dniTmp;
printf("Introduce el DNI del cliente: ");

while (scanf("%i", &dniTmp) != 1)
{
printf("Por favor, introduza números. Intente nuevamente: ");
fflush(stdin);
}

return dniTmp;
}

void reservarCliente()
{
Expand Down Expand Up @@ -522,7 +510,6 @@ void eliminarRestaurarCliente(int nuevoEstadoDeEliminacion, int dniTmp)
}
}


huesped buscarPorDni(int dniOrigen, const char archivo[])
{
huesped Encontrado;
Expand Down Expand Up @@ -552,6 +539,7 @@ huesped buscarPorDni(int dniOrigen, const char archivo[])

return Encontrado;
}

void mostrarTodasLasReservas()
{
huesped A;
Expand Down
20 changes: 15 additions & 5 deletions tmphotel.depend
Original file line number Diff line number Diff line change
Expand Up @@ -311,39 +311,42 @@
1687244091 source:c:\users\juanm\gestion-hotel\pila.c
"pila.h"

1687244091 source:c:\users\juanm\gestion-hotel\reservas.c
1687246555 source:c:\users\juanm\gestion-hotel\reservas.c
<stdio.h>
<stdlib.h>
<string.h>
"tiempo.h"
"reservas.h"
"preguntarDNI.h"
<stdio.h>
<string.h>

1687244091 c:\users\juanm\gestion-hotel\tiempo.h
<stdio.h>
<stdlib.h>

1687244091 c:\users\juanm\gestion-hotel\reservas.h
1687247002 c:\users\juanm\gestion-hotel\reservas.h

1687244091 source:c:\users\juanm\gestion-hotel\tiempo.c
<stdio.h>
<stdlib.h>
<string.h>
"tiempo.h"

1687244459 source:c:\users\juanm\gestion-hotel\empleados.c
1687247042 source:c:\users\juanm\gestion-hotel\empleados.c
<stdio.h>
<stdlib.h>
<string.h>
"tiempo.h"
"empleados.h"
<time.h>
<unistd.h>
"const.h"
"preguntarDNI.h"

1687244563 c:\users\juanm\gestion-hotel\empleados.h
1687246736 c:\users\juanm\gestion-hotel\empleados.h

1687244485 source:c:\users\juanm\gestion-hotel\main.c
1687245650 source:c:\users\juanm\gestion-hotel\main.c
<stdio.h>
<stdlib.h>
"tiempo.h"
Expand All @@ -354,6 +357,13 @@
"linkdepago.h"
"botellas.h"
"empleados.h"
"preguntarDNI.h"

1687244091 c:\users\juanm\gestion-hotel\linkdepago.h

1687245650 c:\users\juanm\gestion-hotel\preguntardni.h

1687246555 source:c:\users\juanm\gestion-hotel\preguntardni.c
<stdlib.h>
<stdio.h>