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 archivos de empleados, un saludo de Juanma #2

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 added arEmpleados.dat
Binary file not shown.
Binary file modified bin/Debug/tmphotel.exe
Binary file not shown.
539 changes: 539 additions & 0 deletions empleados.c

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions empleados.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#ifndef EMPLEADOS_H_INCLUDED
#define EMPLEADOS_H_INCLUDED

typedef struct {
char nombreyApellido[35];
int edad;
char genero[20];
int telefono;
int dni;
char correo[30];
char nacionalidad[20];
char oficio[20];
tiempo fechaAlta;
tiempo fechaBaja;
int bajaPasiva;
} stEmpleado;



///PROTOTIPADOS///
stEmpleado alta1Empleado();
int altaEmpleados(stEmpleado A[], int dimension);
void listar1Empleado (stEmpleado A);
void listarEmpleados(stEmpleado A[], int validos);
void cargar1EmpleadoEnArchivo(stEmpleado A, const char *nombreArchivo);
void mostrarArchivo(char nombreArchivo[], int validos);
void modificarEmpleadoEnArchivo (char nombreArchivo[]);
void bajaEmpleado (char nombreArchivo[]);
void buscarEmpleadoPorDNI(char nombreArchivo[], int dniBuscado);
void mostrarEmpleadosDadosDeBaja(const char* nombreArchivo);
void reactivarEmpleado(const char* nombreArchivo);
void mostrarEmpleadosOrdenadosPorEdad(const char* nombreArchivo);
void mostrarEmpleadosOrdenadosPorNombre(const char* nombreArchivo);

#endif // EMPLEADOS_H_INCLUDED
2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <unistd.h> // Libreria para usleep (retraso en microsegundos)
#include "linkdepago.h"
#include "botellas.h"
#include "empleados.h"

void inicioSesion();
void limpiarPantalla();
Expand Down Expand Up @@ -75,6 +76,7 @@ void inicioSesion() {
break;
case claveAdmin:
printf(colorAmarillo "=== MENU ADMINISTRADOR ===\n" reiniciarColor);
menuEmpleados();
// Aquí va el código del menú del administrador
break;
default:
Expand Down
Binary file added obj/Debug/empleados.o
Binary file not shown.
Binary file modified obj/Debug/main.o
Binary file not shown.
71 changes: 71 additions & 0 deletions tmphotel.depend
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,74 @@
1679999162 source:c:\storage\docs\learning-aprendizaje\aa tecnología\docs\utn\tup\cursada\primer cuatrimestre\prog-laboratorio\trabajo final\reservas-segunda-ver\pila.c
"pila.h"

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

1687244091 c:\users\juanm\gestion-hotel\botellas.h
"pila.h"

1687244091 c:\users\juanm\gestion-hotel\pila.h
<stdio.h>
<malloc.h>

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

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

1687244091 source:c:\users\juanm\gestion-hotel\pila.c
"pila.h"

1687244091 source:c:\users\juanm\gestion-hotel\reservas.c
<stdio.h>
<stdlib.h>
<string.h>
"tiempo.h"
"reservas.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

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
<stdio.h>
<stdlib.h>
<string.h>
"tiempo.h"
"empleados.h"
<time.h>
<unistd.h>

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

1687244485 source:c:\users\juanm\gestion-hotel\main.c
<stdio.h>
<stdlib.h>
"tiempo.h"
"reservas.h"
"const.h"
<time.h>
<unistd.h>
"linkdepago.h"
"botellas.h"
"empleados.h"

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