diff --git a/.vs/compabetoOG/v17/.wsuo b/.vs/compabetoOG/v17/.wsuo
index ff4e67f..0ade0f3 100644
Binary files a/.vs/compabetoOG/v17/.wsuo and b/.vs/compabetoOG/v17/.wsuo differ
diff --git a/.vs/compabetov2.csproj.dtbcache.json b/.vs/compabetov2.csproj.dtbcache.json
index 76dff4e..9626749 100644
--- a/.vs/compabetov2.csproj.dtbcache.json
+++ b/.vs/compabetov2.csproj.dtbcache.json
@@ -1 +1 @@
-{"RootPath":"C:\\Users\\carsu\\source\\repos\\compabetoOG","ProjectFileName":"compabetov2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"cuentas.cs"},{"SourceFile":"cuentas.Designer.cs"},{"SourceFile":"database\\conexion.cs"},{"SourceFile":"database\\DAO.cs"},{"SourceFile":"database\\modelos\\Categoria.cs"},{"SourceFile":"database\\modelos\\Producto.cs"},{"SourceFile":"database\\modelos\\usuario.cs"},{"SourceFile":"database\\service.cs"},{"SourceFile":"inventario.cs"},{"SourceFile":"inventario.Designer.cs"},{"SourceFile":"login.cs"},{"SourceFile":"login.Designer.cs"},{"SourceFile":"MenuPrincipal.cs"},{"SourceFile":"MenuPrincipal.Designer.cs"},{"SourceFile":"mermas.cs"},{"SourceFile":"mermas.Designer.cs"},{"SourceFile":"personal.cs"},{"SourceFile":"personal.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"vender.cs"},{"SourceFile":"vender.Designer.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.SqlServer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.ComponentModel.DataAnnotations.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\\lib\\net46\\System.Data.SQLite.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\System.Data.SQLite.EF6.1.0.118.0\\lib\\net46\\System.Data.SQLite.EF6.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\packages\\System.Data.SQLite.Linq.1.0.118.0\\lib\\net46\\System.Data.SQLite.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Deployment.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\bin\\Debug\\compabetov2.exe","OutputItemRelativePath":"compabetov2.exe"},{"OutputItemFullPath":"C:\\Users\\carsu\\source\\repos\\compabetoOG\\bin\\Debug\\compabetov2.pdb","OutputItemRelativePath":"compabetov2.pdb"}],"CopyToOutputEntries":[]}
\ No newline at end of file
+{"RootPath":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG","ProjectFileName":"compabetov2.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"cuentas.cs"},{"SourceFile":"cuentas.Designer.cs"},{"SourceFile":"database\\conexion.cs"},{"SourceFile":"database\\DAO.cs"},{"SourceFile":"database\\modelos\\Categoria.cs"},{"SourceFile":"database\\modelos\\Cliente.cs"},{"SourceFile":"database\\modelos\\Producto.cs"},{"SourceFile":"database\\modelos\\usuario.cs"},{"SourceFile":"database\\service.cs"},{"SourceFile":"envios.cs"},{"SourceFile":"envios.Designer.cs"},{"SourceFile":"inventario.cs"},{"SourceFile":"inventario.Designer.cs"},{"SourceFile":"login.cs"},{"SourceFile":"login.Designer.cs"},{"SourceFile":"MenuPrincipal.cs"},{"SourceFile":"MenuPrincipal.Designer.cs"},{"SourceFile":"mermas.cs"},{"SourceFile":"mermas.Designer.cs"},{"SourceFile":"personal.cs"},{"SourceFile":"personal.Designer.cs"},{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"vender.cs"},{"SourceFile":"vender.Designer.cs"},{"SourceFile":"Properties\\Resources.Designer.cs"},{"SourceFile":"Properties\\Settings.Designer.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\packages\\EntityFramework.6.4.4\\lib\\net45\\EntityFramework.SqlServer.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.ComponentModel.DataAnnotations.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\packages\\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\\lib\\net46\\System.Data.SQLite.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\packages\\System.Data.SQLite.EF6.1.0.118.0\\lib\\net46\\System.Data.SQLite.EF6.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\packages\\System.Data.SQLite.Linq.1.0.118.0\\lib\\net46\\System.Data.SQLite.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Deployment.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\bin\\Debug\\compabetov2.exe","OutputItemRelativePath":"compabetov2.exe"},{"OutputItemFullPath":"C:\\Users\\carsu\\Source\\Repos\\compabetoOG\\bin\\Debug\\compabetov2.pdb","OutputItemRelativePath":"compabetov2.pdb"}],"CopyToOutputEntries":[]}
\ No newline at end of file
diff --git a/Properties/DataSources/compabetov2.database.Conexion.datasource b/Properties/DataSources/compabetov2.database.Conexion.datasource
new file mode 100644
index 0000000..80b856b
--- /dev/null
+++ b/Properties/DataSources/compabetov2.database.Conexion.datasource
@@ -0,0 +1,10 @@
+
+
+
+ compabetov2.database.Conexion, compabetov2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/Properties/DataSources/compabetov2.database.modelos.Empleado.datasource b/Properties/DataSources/compabetov2.database.modelos.Empleado.datasource
new file mode 100644
index 0000000..7b6d2f2
--- /dev/null
+++ b/Properties/DataSources/compabetov2.database.modelos.Empleado.datasource
@@ -0,0 +1,10 @@
+
+
+
+ compabetov2.database.modelos.Empleado, compabetov2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+
\ No newline at end of file
diff --git a/bin/Debug/compabetov2.exe b/bin/Debug/compabetov2.exe
index 7fd317f..d46cdeb 100644
Binary files a/bin/Debug/compabetov2.exe and b/bin/Debug/compabetov2.exe differ
diff --git a/bin/Debug/compabetov2.pdb b/bin/Debug/compabetov2.pdb
index 826ca1d..aab028b 100644
Binary files a/bin/Debug/compabetov2.pdb and b/bin/Debug/compabetov2.pdb differ
diff --git a/bin/Debug/data.db b/bin/Debug/data.db
index 7748c26..fd8c616 100644
Binary files a/bin/Debug/data.db and b/bin/Debug/data.db differ
diff --git a/compabetov2.csproj b/compabetov2.csproj
index d900e9f..b150648 100644
--- a/compabetov2.csproj
+++ b/compabetov2.csproj
@@ -70,7 +70,8 @@
- C:\Users\Googl\Desktop\CompaBeto\icono.ico
+
+
@@ -112,6 +113,7 @@
+
@@ -195,6 +197,8 @@
+
+
SettingsSingleFileGenerator
Settings.Designer.cs
diff --git a/database/DAO.cs b/database/DAO.cs
index 57358b5..f0dae2e 100644
--- a/database/DAO.cs
+++ b/database/DAO.cs
@@ -75,6 +75,72 @@ namespace compabetov2.database
}
}
+ public static bool insertarEmpleadoDAO(Empleado empleado)
+ {
+ var db_conexion = new Conexion();
+ try
+ {
+ using (SQLiteConnection conexion = db_conexion.get_connection())
+ {
+ conexion.Open();
+
+ string sql = "INSERT INTO Empleado (nombre, apellidos, calle, fecha_contratacion, estado, colonia, cp, no_ext, no_int, referencia, fecha_nac, telefono) " +
+ "VALUES (@nombre, @apellidos, @calle, @fecha_contratacion, @estado, @colonia, @cp, @no_ext, @no_int, @referencia, @fecha_nac, @telefono)";
+
+
+
+ using (SQLiteCommand command = new SQLiteCommand(sql, conexion))
+ {
+ command.Parameters.AddWithValue("@nombre", empleado.nombre);
+ command.Parameters.AddWithValue("@apellidos", empleado.apellidos);
+ command.Parameters.AddWithValue("@calle", empleado.calle);
+ command.Parameters.AddWithValue("@fecha_contratacion", empleado.fecha_contratacion);
+ command.Parameters.AddWithValue("@estado", empleado.estado);
+ command.Parameters.AddWithValue("@colonia", empleado.colonia);
+ command.Parameters.AddWithValue("@cp", empleado.cp);
+ command.Parameters.AddWithValue("@no_ext", empleado.no_ext);
+ command.Parameters.AddWithValue("@no_int", empleado.no_int);
+ command.Parameters.AddWithValue("@referencia", empleado.referencia);
+ command.Parameters.AddWithValue("@fecha_nac", empleado.fecha_nac);
+ command.Parameters.AddWithValue("@telefono", empleado.telefono);
+
+ int filasAfectadas = command.ExecuteNonQuery();
+
+ if (filasAfectadas > 0) { return true; }
+ else { return false; }
+ }
+ }
+ }
+ catch (SQLiteException ex)
+ {
+ MessageBox.Show(ex.Message);
+ return false;
+ }
+ }
+
+ public static SQLiteDataReader conseguirEmpleadosDAO()
+ {
+ SQLiteDataReader reader = null;
+ var db_conexion = new Conexion();
+ try
+ {
+ SQLiteConnection conexion = db_conexion.get_connection();
+
+ conexion.Open();
+
+ string sql = "SELECT * FROM Empleado";
+ SQLiteCommand command = new SQLiteCommand(sql, conexion);
+ reader = command.ExecuteReader();
+
+ return reader;
+
+ }
+ catch (SQLiteException ex)
+ {
+ MessageBox.Show(ex.Message);
+ return reader;
+ }
+ }
public static SQLiteDataReader conseguirProductosDAO()
{
SQLiteDataReader reader = null;
@@ -320,8 +386,8 @@ namespace compabetov2.database
"DROP TABLE IF EXISTS Cliente",
"CREATE TABLE Empleado (idempleado INTEGER PRIMARY KEY AUTOINCREMENT, nombre TEXT NOT NULL, "+
- "apellido TEXT NOT NULL, calle TEXT NOT NULL, fecha_contratacion TEXT NOT NULL, colonia TEXT NOT NULL, cp TEXT NOT NULL, no_ext TEXT NOT NULL," +
- "no_int TEXT NOT NULL, referencia TEXT NOT NULL, fecha_nac TEXT NOT NULL, telefono TEXT NOT NULL, activo INTEGER NOT NULL)",
+ "apellidos TEXT NOT NULL, calle TEXT NOT NULL, fecha_contratacion TEXT NOT NULL,estado TEXT NOT NULL, colonia TEXT NOT NULL, cp TEXT NOT NULL, no_ext TEXT NOT NULL," +
+ "no_int TEXT NOT NULL, referencia TEXT NOT NULL, fecha_nac TEXT NOT NULL, telefono TEXT NOT NULL)",
"CREATE TABLE Login (idlogin INTEGER PRIMARY KEY AUTOINCREMENT, tipo TEXT NOT NULL, usuario TEXT NOT NULL, "+
"contra TEXT NOT NULL, fk_idempleado INTEGER NOT NULL, FOREIGN KEY (fk_idempleado) REFERENCES Empleado (idempleado))",
@@ -336,7 +402,7 @@ namespace compabetov2.database
"calle TEXT NOT NULL, colonia TEXT NOT NULL, cp TEXT NOT NULL, no_ext TEXT NOT NULL, no_int TEXT NOT NULL, referencia TEXT NOT NULL, " +
"telefono TEXT NOT NULL, telefono_extra TEXT NOT NULL)",
- "INSERT INTO Empleado ( nombre, apellido, calle, fecha_contratacion, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono, activo) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', 0);",
+ "INSERT INTO Empleado ( nombre, apellidos, calle, fecha_contratacion,estado, colonia, cp, no_ext,no_int, referencia, fecha_nac, telefono) VALUES('jefe', '', '', '', '', '', '', '', '', '', '', '');",
"INSERT INTO Login ( tipo, usuario, contra, fk_idempleado) VALUES('admin', 'admin', '12345', 1);"
};
diff --git a/database/modelos/Empleado.cs b/database/modelos/Empleado.cs
new file mode 100644
index 0000000..03a1e58
--- /dev/null
+++ b/database/modelos/Empleado.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace compabetov2.database.modelos
+{
+ internal class Empleado
+ {
+ public int idempleado;
+ public string nombre;
+ public string apellidos;
+ public string calle;
+ public string fecha_contratacion;
+ public string estado;
+ public string colonia;
+ public string cp;
+ public string no_ext;
+ public string no_int;
+ public string referencia;
+ public string fecha_nac;
+ public string telefono;
+
+ public Empleado(int idempeado = -1, string nombre ="", string apellidos = "", string calle = "", string fecha_contratacion = "", string estado = "", string colonia = "", string cp = "", string no_ext = "", string no_int = "", string referencia = "", string fecha_nac = "", string telefono ="")
+ {
+ this.idempleado = idempeado;
+ this.nombre = nombre;
+ this.apellidos = apellidos;
+ this.calle = calle;
+ this.fecha_contratacion=fecha_contratacion;
+ this.estado = estado;
+ this.colonia = colonia;
+ this.cp = cp;
+ this.no_ext = no_ext;
+ this.no_int = no_int;
+ this.referencia = referencia;
+ this.fecha_nac=fecha_nac;
+ this.telefono = telefono;
+ }
+ }
+}
diff --git a/database/service.cs b/database/service.cs
index c7fe170..f221d1e 100644
--- a/database/service.cs
+++ b/database/service.cs
@@ -4,6 +4,7 @@ using System.Data.SQLite;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Forms;
using compabetov2.database;
using compabetov2.database.modelos;
@@ -89,5 +90,46 @@ namespace compabetov2.database
}
return clientes;
}
+
+ public static bool insertarEmpleado(Empleado empleado)
+ {
+ return DAO.insertarEmpleadoDAO(empleado);
+ }
+
+ public static List conseguirEmpleados()
+ {
+ List empleados = new List();
+
+ using (SQLiteDataReader reader = DAO.conseguirEmpleadosDAO()) {
+ if(reader == null) { MessageBox.Show("null");
+ return empleados;
+ } else
+ {
+ while (reader.Read())
+ {
+ Empleado empleado = new Empleado(
+ (int)reader["idempleado"],
+ (string)reader["nombre"].ToString(),
+ (string)reader["apellidos"].ToString(),
+ (string)reader["calle"].ToString(),
+ (string)reader["fecha_contratacion"].ToString(),
+ (string)reader["estado"].ToString(),
+ (string)reader["colonia"].ToString(),
+ (string)reader["cp"].ToString(),
+ (string)reader["no_ext"].ToString(),
+ (string)reader["no_int"].ToString(),
+ (string)reader["referencia"].ToString(),
+ (string)reader["fecha_nac"].ToString(),
+ (string)reader["telefono"].ToString()
+ );
+ empleados.Add(empleado);
+ }
+ return empleados;
+ }
+
+ }
+
+
+ }
}
}
diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache
index 10a1a65..4c0e587 100644
Binary files a/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index b16bcfc..cb8df7d 100644
Binary files a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/obj/Debug/compabetov2.csproj.AssemblyReference.cache b/obj/Debug/compabetov2.csproj.AssemblyReference.cache
index 314837d..bc5a171 100644
Binary files a/obj/Debug/compabetov2.csproj.AssemblyReference.cache and b/obj/Debug/compabetov2.csproj.AssemblyReference.cache differ
diff --git a/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache b/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache
index 908493f..8f1bb2d 100644
--- a/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache
+++ b/obj/Debug/compabetov2.csproj.CoreCompileInputs.cache
@@ -1,5 +1 @@
-<<<<<<< HEAD
-5f84ca15ab0cf8658a0603f2d37cc1ef407c340f
-=======
-02dc50247532cb20084f44304c5c95e6e614121351100c9987f88dd3c1f0e1c2
->>>>>>> 715f763c719aade878f3297c3fdbd71fd7d60dcb
+424f6d4f8bcbc47e89c98d2fa689cb77dffd9f6b5116717e9e8dca5ece3777d7
diff --git a/obj/Debug/compabetov2.csproj.FileListAbsolute.txt b/obj/Debug/compabetov2.csproj.FileListAbsolute.txt
index 9340bd0..5f1e2a0 100644
--- a/obj/Debug/compabetov2.csproj.FileListAbsolute.txt
+++ b/obj/Debug/compabetov2.csproj.FileListAbsolute.txt
@@ -52,3 +52,8 @@ C:\Users\Googl\Documents\compabetov2\bin\Debug\compabetov2.exe.manifest
C:\Users\Googl\Documents\compabetov2\bin\Debug\compabetov2.application
C:\Users\Googl\Documents\compabetov2\obj\Debug\compabetov2.exe.manifest
C:\Users\Googl\Documents\compabetov2\obj\Debug\compabetov2.application
+C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.envios.resources
+C:\Users\carsu\Source\Repos\compabetoOG\bin\Debug\compabetov2.exe.manifest
+C:\Users\carsu\Source\Repos\compabetoOG\bin\Debug\compabetov2.application
+C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.exe.manifest
+C:\Users\carsu\Source\Repos\compabetoOG\obj\Debug\compabetov2.application
diff --git a/obj/Debug/compabetov2.csproj.GenerateResource.cache b/obj/Debug/compabetov2.csproj.GenerateResource.cache
index c4f0af0..7c50885 100644
Binary files a/obj/Debug/compabetov2.csproj.GenerateResource.cache and b/obj/Debug/compabetov2.csproj.GenerateResource.cache differ
diff --git a/obj/Debug/compabetov2.exe b/obj/Debug/compabetov2.exe
index 7fd317f..d46cdeb 100644
Binary files a/obj/Debug/compabetov2.exe and b/obj/Debug/compabetov2.exe differ
diff --git a/obj/Debug/compabetov2.pdb b/obj/Debug/compabetov2.pdb
index 826ca1d..aab028b 100644
Binary files a/obj/Debug/compabetov2.pdb and b/obj/Debug/compabetov2.pdb differ
diff --git a/personal.Designer.cs b/personal.Designer.cs
index 9d747ab..9a17900 100644
--- a/personal.Designer.cs
+++ b/personal.Designer.cs
@@ -28,6 +28,7 @@
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.panel2 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
@@ -64,15 +65,22 @@
this.button7 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.label12 = new System.Windows.Forms.Label();
+ this.dataGridView1 = new System.Windows.Forms.DataGridView();
+ this.empleadoBindingSource = new System.Windows.Forms.BindingSource(this.components);
+ this.conexionBindingSource = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
this.panel2.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.empleadoBindingSource)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.conexionBindingSource)).BeginInit();
this.SuspendLayout();
//
// pictureBox7
//
this.pictureBox7.Image = global::compabetov2.Properties.Resources.HomeroMenu;
- this.pictureBox7.Location = new System.Drawing.Point(64, 35);
+ this.pictureBox7.Location = new System.Drawing.Point(48, 28);
+ this.pictureBox7.Margin = new System.Windows.Forms.Padding(2);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(190, 197);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -83,9 +91,10 @@
//
this.panel2.BackColor = System.Drawing.Color.Transparent;
this.panel2.Controls.Add(this.pictureBox7);
- this.panel2.Location = new System.Drawing.Point(3, 3);
+ this.panel2.Location = new System.Drawing.Point(2, 2);
+ this.panel2.Margin = new System.Windows.Forms.Padding(2);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(312, 263);
+ this.panel2.Size = new System.Drawing.Size(234, 214);
this.panel2.TabIndex = 8;
//
// button1
@@ -93,14 +102,15 @@
this.button1.BackColor = System.Drawing.Color.Transparent;
this.button1.FlatAppearance.BorderSize = 0;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button1.Font = new System.Drawing.Font("Poppins SemiBold", 15F);
+ this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Image = global::compabetov2.Properties.Resources.Menui1;
this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button1.Location = new System.Drawing.Point(3, 272);
+ this.button1.Location = new System.Drawing.Point(2, 220);
+ this.button1.Margin = new System.Windows.Forms.Padding(2);
this.button1.Name = "button1";
- this.button1.Padding = new System.Windows.Forms.Padding(50, 0, 0, 0);
- this.button1.Size = new System.Drawing.Size(312, 115);
+ this.button1.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
+ this.button1.Size = new System.Drawing.Size(234, 93);
this.button1.TabIndex = 8;
this.button1.Text = "Menú";
this.button1.UseVisualStyleBackColor = false;
@@ -110,14 +120,15 @@
this.button2.BackColor = System.Drawing.Color.Transparent;
this.button2.FlatAppearance.BorderSize = 0;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button2.Font = new System.Drawing.Font("Poppins SemiBold", 15F);
+ this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button2.Image = global::compabetov2.Properties.Resources.estadisticasi;
this.button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button2.Location = new System.Drawing.Point(3, 393);
+ this.button2.Location = new System.Drawing.Point(2, 317);
+ this.button2.Margin = new System.Windows.Forms.Padding(2);
this.button2.Name = "button2";
- this.button2.Padding = new System.Windows.Forms.Padding(50, 0, 0, 0);
- this.button2.Size = new System.Drawing.Size(312, 115);
+ this.button2.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
+ this.button2.Size = new System.Drawing.Size(234, 93);
this.button2.TabIndex = 9;
this.button2.Text = "Estadisticas";
this.button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
@@ -128,14 +139,15 @@
this.button3.BackColor = System.Drawing.Color.Transparent;
this.button3.FlatAppearance.BorderSize = 0;
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button3.Font = new System.Drawing.Font("Poppins SemiBold", 15F);
+ this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button3.Image = global::compabetov2.Properties.Resources.productoi;
this.button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button3.Location = new System.Drawing.Point(3, 514);
+ this.button3.Location = new System.Drawing.Point(2, 414);
+ this.button3.Margin = new System.Windows.Forms.Padding(2);
this.button3.Name = "button3";
- this.button3.Padding = new System.Windows.Forms.Padding(50, 0, 0, 0);
- this.button3.Size = new System.Drawing.Size(312, 115);
+ this.button3.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
+ this.button3.Size = new System.Drawing.Size(234, 93);
this.button3.TabIndex = 10;
this.button3.Text = "Productos";
this.button3.UseVisualStyleBackColor = false;
@@ -145,14 +157,15 @@
this.button4.BackColor = System.Drawing.Color.Transparent;
this.button4.FlatAppearance.BorderSize = 0;
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button4.Font = new System.Drawing.Font("Poppins SemiBold", 15F);
+ this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button4.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button4.Image = global::compabetov2.Properties.Resources.reportesi;
this.button4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button4.Location = new System.Drawing.Point(3, 635);
+ this.button4.Location = new System.Drawing.Point(2, 511);
+ this.button4.Margin = new System.Windows.Forms.Padding(2);
this.button4.Name = "button4";
- this.button4.Padding = new System.Windows.Forms.Padding(50, 0, 0, 0);
- this.button4.Size = new System.Drawing.Size(312, 115);
+ this.button4.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
+ this.button4.Size = new System.Drawing.Size(234, 93);
this.button4.TabIndex = 11;
this.button4.Text = "Reportes";
this.button4.UseVisualStyleBackColor = false;
@@ -162,14 +175,15 @@
this.button5.BackColor = System.Drawing.Color.Transparent;
this.button5.FlatAppearance.BorderSize = 0;
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.button5.Font = new System.Drawing.Font("Poppins SemiBold", 15F);
+ this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.button5.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button5.Image = global::compabetov2.Properties.Resources.sesionc;
this.button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.button5.Location = new System.Drawing.Point(3, 756);
+ this.button5.Location = new System.Drawing.Point(2, 608);
+ this.button5.Margin = new System.Windows.Forms.Padding(2);
this.button5.Name = "button5";
- this.button5.Padding = new System.Windows.Forms.Padding(50, 0, 0, 0);
- this.button5.Size = new System.Drawing.Size(312, 115);
+ this.button5.Padding = new System.Windows.Forms.Padding(38, 0, 0, 0);
+ this.button5.Size = new System.Drawing.Size(234, 93);
this.button5.TabIndex = 12;
this.button5.Text = "Salir";
this.button5.UseVisualStyleBackColor = false;
@@ -184,89 +198,90 @@
this.flowLayoutPanel1.Controls.Add(this.button4);
this.flowLayoutPanel1.Controls.Add(this.button5);
this.flowLayoutPanel1.Location = new System.Drawing.Point(-2, -2);
+ this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(2);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
- this.flowLayoutPanel1.Size = new System.Drawing.Size(324, 1061);
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(243, 862);
this.flowLayoutPanel1.TabIndex = 8;
//
// txtnombrepersonal
//
this.txtnombrepersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtnombrepersonal.Location = new System.Drawing.Point(493, 347);
- this.txtnombrepersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtnombrepersonal.Location = new System.Drawing.Point(370, 282);
+ this.txtnombrepersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtnombrepersonal.Name = "txtnombrepersonal";
- this.txtnombrepersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtnombrepersonal.Size = new System.Drawing.Size(225, 45);
this.txtnombrepersonal.TabIndex = 13;
//
// txtapellidopersonal
//
this.txtapellidopersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtapellidopersonal.Location = new System.Drawing.Point(818, 347);
- this.txtapellidopersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtapellidopersonal.Location = new System.Drawing.Point(614, 282);
+ this.txtapellidopersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtapellidopersonal.Name = "txtapellidopersonal";
- this.txtapellidopersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtapellidopersonal.Size = new System.Drawing.Size(225, 45);
this.txtapellidopersonal.TabIndex = 14;
//
// txtnointpersonal
//
this.txtnointpersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtnointpersonal.Location = new System.Drawing.Point(493, 572);
- this.txtnointpersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtnointpersonal.Location = new System.Drawing.Point(370, 465);
+ this.txtnointpersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtnointpersonal.Name = "txtnointpersonal";
- this.txtnointpersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtnointpersonal.Size = new System.Drawing.Size(225, 45);
this.txtnointpersonal.TabIndex = 20;
//
// txtnoextpersonal
//
this.txtnoextpersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtnoextpersonal.Location = new System.Drawing.Point(1464, 452);
- this.txtnoextpersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtnoextpersonal.Location = new System.Drawing.Point(1098, 367);
+ this.txtnoextpersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtnoextpersonal.Name = "txtnoextpersonal";
- this.txtnoextpersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtnoextpersonal.Size = new System.Drawing.Size(225, 45);
this.txtnoextpersonal.TabIndex = 19;
//
// txtcodigopersonal
//
this.txtcodigopersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtcodigopersonal.Location = new System.Drawing.Point(1141, 452);
- this.txtcodigopersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtcodigopersonal.Location = new System.Drawing.Point(856, 367);
+ this.txtcodigopersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtcodigopersonal.Name = "txtcodigopersonal";
- this.txtcodigopersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtcodigopersonal.Size = new System.Drawing.Size(225, 45);
this.txtcodigopersonal.TabIndex = 18;
//
// txtcoloniapersonal
//
this.txtcoloniapersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtcoloniapersonal.Location = new System.Drawing.Point(816, 452);
- this.txtcoloniapersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtcoloniapersonal.Location = new System.Drawing.Point(612, 367);
+ this.txtcoloniapersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtcoloniapersonal.Name = "txtcoloniapersonal";
- this.txtcoloniapersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtcoloniapersonal.Size = new System.Drawing.Size(225, 45);
this.txtcoloniapersonal.TabIndex = 17;
//
// txtcallepersonal
//
this.txtcallepersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtcallepersonal.Location = new System.Drawing.Point(1141, 347);
- this.txtcallepersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtcallepersonal.Location = new System.Drawing.Point(856, 282);
+ this.txtcallepersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtcallepersonal.Name = "txtcallepersonal";
- this.txtcallepersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtcallepersonal.Size = new System.Drawing.Size(225, 45);
this.txtcallepersonal.TabIndex = 24;
//
// txttelefonopersonal
//
this.txttelefonopersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txttelefonopersonal.Location = new System.Drawing.Point(1464, 550);
- this.txttelefonopersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txttelefonopersonal.Location = new System.Drawing.Point(1098, 447);
+ this.txttelefonopersonal.Margin = new System.Windows.Forms.Padding(2);
this.txttelefonopersonal.Name = "txttelefonopersonal";
- this.txttelefonopersonal.Size = new System.Drawing.Size(299, 55);
+ this.txttelefonopersonal.Size = new System.Drawing.Size(225, 45);
this.txttelefonopersonal.TabIndex = 23;
//
// txtreferenciapersonal
//
this.txtreferenciapersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 25F);
- this.txtreferenciapersonal.Location = new System.Drawing.Point(816, 550);
- this.txtreferenciapersonal.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.txtreferenciapersonal.Location = new System.Drawing.Point(612, 447);
+ this.txtreferenciapersonal.Margin = new System.Windows.Forms.Padding(2);
this.txtreferenciapersonal.Name = "txtreferenciapersonal";
- this.txtreferenciapersonal.Size = new System.Drawing.Size(299, 55);
+ this.txtreferenciapersonal.Size = new System.Drawing.Size(225, 45);
this.txtreferenciapersonal.TabIndex = 21;
//
// label1
@@ -274,9 +289,10 @@
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label1.ForeColor = System.Drawing.Color.Navy;
- this.label1.Location = new System.Drawing.Point(496, 302);
+ this.label1.Location = new System.Drawing.Point(372, 245);
+ this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(138, 39);
+ this.label1.Size = new System.Drawing.Size(110, 31);
this.label1.TabIndex = 25;
this.label1.Text = "Nombre";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -287,9 +303,10 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label2.ForeColor = System.Drawing.Color.Navy;
- this.label2.Location = new System.Drawing.Point(811, 306);
+ this.label2.Location = new System.Drawing.Point(608, 249);
+ this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(140, 39);
+ this.label2.Size = new System.Drawing.Size(110, 31);
this.label2.TabIndex = 26;
this.label2.Text = "Apellido";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -299,28 +316,31 @@
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label3.ForeColor = System.Drawing.Color.Navy;
- this.label3.Location = new System.Drawing.Point(1460, 306);
+ this.label3.Location = new System.Drawing.Point(1095, 249);
+ this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(353, 39);
+ this.label3.Size = new System.Drawing.Size(283, 31);
this.label3.TabIndex = 27;
this.label3.Text = "Fecha de contratación";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// dtpfechapersonal
//
- this.dtpfechapersonal.Font = new System.Drawing.Font("Poppins Medium", 15F);
- this.dtpfechapersonal.Location = new System.Drawing.Point(1467, 359);
+ this.dtpfechapersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
+ this.dtpfechapersonal.Location = new System.Drawing.Point(1100, 292);
+ this.dtpfechapersonal.Margin = new System.Windows.Forms.Padding(2);
this.dtpfechapersonal.Name = "dtpfechapersonal";
- this.dtpfechapersonal.Size = new System.Drawing.Size(296, 45);
+ this.dtpfechapersonal.Size = new System.Drawing.Size(223, 30);
this.dtpfechapersonal.TabIndex = 28;
//
// cbestadopersonal
//
this.cbestadopersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 26F);
this.cbestadopersonal.FormattingEnabled = true;
- this.cbestadopersonal.Location = new System.Drawing.Point(493, 452);
+ this.cbestadopersonal.Location = new System.Drawing.Point(370, 367);
+ this.cbestadopersonal.Margin = new System.Windows.Forms.Padding(2);
this.cbestadopersonal.Name = "cbestadopersonal";
- this.cbestadopersonal.Size = new System.Drawing.Size(160, 59);
+ this.cbestadopersonal.Size = new System.Drawing.Size(121, 47);
this.cbestadopersonal.TabIndex = 29;
//
// label4
@@ -328,9 +348,10 @@
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label4.ForeColor = System.Drawing.Color.Navy;
- this.label4.Location = new System.Drawing.Point(507, 407);
+ this.label4.Location = new System.Drawing.Point(380, 331);
+ this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(123, 39);
+ this.label4.Size = new System.Drawing.Size(99, 31);
this.label4.TabIndex = 30;
this.label4.Text = "Estado";
this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -340,9 +361,10 @@
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label5.ForeColor = System.Drawing.Color.Navy;
- this.label5.Location = new System.Drawing.Point(819, 411);
+ this.label5.Location = new System.Drawing.Point(614, 334);
+ this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(134, 39);
+ this.label5.Size = new System.Drawing.Size(106, 31);
this.label5.TabIndex = 31;
this.label5.Text = "Colonia";
this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -352,9 +374,10 @@
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label6.ForeColor = System.Drawing.Color.Navy;
- this.label6.Location = new System.Drawing.Point(1140, 411);
+ this.label6.Location = new System.Drawing.Point(855, 334);
+ this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(230, 39);
+ this.label6.Size = new System.Drawing.Size(183, 31);
this.label6.TabIndex = 32;
this.label6.Text = "Codigo Postal";
this.label6.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -364,9 +387,10 @@
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label7.ForeColor = System.Drawing.Color.Navy;
- this.label7.Location = new System.Drawing.Point(1457, 406);
+ this.label7.Location = new System.Drawing.Point(1093, 330);
+ this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(128, 39);
+ this.label7.Size = new System.Drawing.Size(103, 31);
this.label7.TabIndex = 33;
this.label7.Text = "No. Ext";
this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -376,9 +400,10 @@
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label8.ForeColor = System.Drawing.Color.Navy;
- this.label8.Location = new System.Drawing.Point(486, 526);
+ this.label8.Location = new System.Drawing.Point(364, 427);
+ this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(117, 39);
+ this.label8.Size = new System.Drawing.Size(95, 31);
this.label8.TabIndex = 34;
this.label8.Text = "No. Int";
this.label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -388,19 +413,21 @@
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label9.ForeColor = System.Drawing.Color.Navy;
- this.label9.Location = new System.Drawing.Point(819, 509);
+ this.label9.Location = new System.Drawing.Point(614, 414);
+ this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(182, 39);
+ this.label9.Size = new System.Drawing.Size(146, 31);
this.label9.TabIndex = 35;
this.label9.Text = "Referencia";
this.label9.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// dtpnacimientopersonal
//
- this.dtpnacimientopersonal.Font = new System.Drawing.Font("Poppins Medium", 15F);
- this.dtpnacimientopersonal.Location = new System.Drawing.Point(1141, 560);
+ this.dtpnacimientopersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
+ this.dtpnacimientopersonal.Location = new System.Drawing.Point(856, 455);
+ this.dtpnacimientopersonal.Margin = new System.Windows.Forms.Padding(2);
this.dtpnacimientopersonal.Name = "dtpnacimientopersonal";
- this.dtpnacimientopersonal.Size = new System.Drawing.Size(296, 45);
+ this.dtpnacimientopersonal.Size = new System.Drawing.Size(223, 30);
this.dtpnacimientopersonal.TabIndex = 36;
//
// label10
@@ -408,9 +435,10 @@
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label10.ForeColor = System.Drawing.Color.Navy;
- this.label10.Location = new System.Drawing.Point(1134, 509);
+ this.label10.Location = new System.Drawing.Point(850, 414);
+ this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(339, 39);
+ this.label10.Size = new System.Drawing.Size(270, 31);
this.label10.TabIndex = 37;
this.label10.Text = "Fecha de Nacimiento";
this.label10.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -420,9 +448,10 @@
this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label11.ForeColor = System.Drawing.Color.Navy;
- this.label11.Location = new System.Drawing.Point(1479, 509);
+ this.label11.Location = new System.Drawing.Point(1109, 414);
+ this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(150, 39);
+ this.label11.Size = new System.Drawing.Size(120, 31);
this.label11.TabIndex = 38;
this.label11.Text = "Telefono";
this.label11.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -430,10 +459,10 @@
// button9
//
this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.button9.Location = new System.Drawing.Point(1377, 698);
- this.button9.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.button9.Location = new System.Drawing.Point(1033, 567);
+ this.button9.Margin = new System.Windows.Forms.Padding(2);
this.button9.Name = "button9";
- this.button9.Size = new System.Drawing.Size(171, 70);
+ this.button9.Size = new System.Drawing.Size(128, 57);
this.button9.TabIndex = 42;
this.button9.Text = "Eliminar";
this.button9.UseVisualStyleBackColor = true;
@@ -441,10 +470,10 @@
// button8
//
this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.button8.Location = new System.Drawing.Point(1177, 698);
- this.button8.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.button8.Location = new System.Drawing.Point(883, 567);
+ this.button8.Margin = new System.Windows.Forms.Padding(2);
this.button8.Name = "button8";
- this.button8.Size = new System.Drawing.Size(171, 70);
+ this.button8.Size = new System.Drawing.Size(128, 57);
this.button8.TabIndex = 41;
this.button8.Text = "Editar";
this.button8.UseVisualStyleBackColor = true;
@@ -452,10 +481,10 @@
// button7
//
this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.button7.Location = new System.Drawing.Point(977, 698);
- this.button7.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.button7.Location = new System.Drawing.Point(733, 567);
+ this.button7.Margin = new System.Windows.Forms.Padding(2);
this.button7.Name = "button7";
- this.button7.Size = new System.Drawing.Size(171, 70);
+ this.button7.Size = new System.Drawing.Size(128, 57);
this.button7.TabIndex = 40;
this.button7.Text = "Buscar";
this.button7.UseVisualStyleBackColor = true;
@@ -463,31 +492,51 @@
// button6
//
this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.button6.Location = new System.Drawing.Point(778, 698);
- this.button6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+ this.button6.Location = new System.Drawing.Point(584, 567);
+ this.button6.Margin = new System.Windows.Forms.Padding(2);
this.button6.Name = "button6";
- this.button6.Size = new System.Drawing.Size(171, 70);
+ this.button6.Size = new System.Drawing.Size(128, 57);
this.button6.TabIndex = 39;
this.button6.Text = "Agregar";
this.button6.UseVisualStyleBackColor = true;
+ this.button6.Click += new System.EventHandler(this.button6_Click);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F);
this.label12.ForeColor = System.Drawing.Color.Navy;
- this.label12.Location = new System.Drawing.Point(1134, 306);
+ this.label12.Location = new System.Drawing.Point(850, 249);
+ this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(96, 39);
+ this.label12.Size = new System.Drawing.Size(76, 31);
this.label12.TabIndex = 43;
this.label12.Text = "Calle";
this.label12.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
+ // dataGridView1
+ //
+ this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView1.Location = new System.Drawing.Point(444, 75);
+ this.dataGridView1.Name = "dataGridView1";
+ this.dataGridView1.Size = new System.Drawing.Size(240, 150);
+ this.dataGridView1.TabIndex = 44;
+ this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
+ //
+ // empleadoBindingSource
+ //
+ this.empleadoBindingSource.DataSource = typeof(compabetov2.database.modelos.Empleado);
+ //
+ // conexionBindingSource
+ //
+ this.conexionBindingSource.DataSource = typeof(compabetov2.database.Conexion);
+ //
// personal
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1924, 1055);
+ this.ClientSize = new System.Drawing.Size(1028, 609);
+ this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.label12);
this.Controls.Add(this.button9);
this.Controls.Add(this.button8);
@@ -517,6 +566,7 @@
this.Controls.Add(this.txtapellidopersonal);
this.Controls.Add(this.txtnombrepersonal);
this.Controls.Add(this.flowLayoutPanel1);
+ this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "personal";
this.Text = "personal";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
@@ -524,6 +574,9 @@
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.empleadoBindingSource)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.conexionBindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -567,5 +620,8 @@
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Label label12;
+ private System.Windows.Forms.DataGridView dataGridView1;
+ private System.Windows.Forms.BindingSource conexionBindingSource;
+ private System.Windows.Forms.BindingSource empleadoBindingSource;
}
}
\ No newline at end of file
diff --git a/personal.cs b/personal.cs
index 9eb29ba..6637d49 100644
--- a/personal.cs
+++ b/personal.cs
@@ -1,4 +1,6 @@
-using System;
+using compabetov2.database;
+using compabetov2.database.modelos;
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -15,11 +17,44 @@ namespace compabetov2
public personal()
{
InitializeComponent();
+ llenarGrid();
}
private void label1_Click(object sender, EventArgs e)
{
}
+
+ private void button6_Click(object sender, EventArgs e)
+ {
+ Empleado empleado = new Empleado(
+ -1,
+ txtnombrepersonal.Text,
+ txtapellidopersonal.Text,
+ txtcallepersonal.Text,
+ dtpfechapersonal.Text,
+ cbestadopersonal.Text,
+ txtcoloniapersonal.Text,
+ txtcodigopersonal.Text,
+ txtnoextpersonal.Text,
+ txtnointpersonal.Text,
+ txtreferenciapersonal.Text,
+ dtpnacimientopersonal.Text,
+ txttelefonopersonal.Text
+ );
+
+ service.insertarEmpleado( empleado );
+ }
+
+ private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
+ {
+
+ }
+
+ private void llenarGrid()
+ {
+ List empleados = service.conseguirEmpleados();
+ //dataGridView1.DataSource = empleados;
+ }
}
}
diff --git a/personal.resx b/personal.resx
index 1af7de1..415b6af 100644
--- a/personal.resx
+++ b/personal.resx
@@ -117,4 +117,10 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 197, 17
+
+
+ 17, 17
+
\ No newline at end of file