gridview empleados
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ExpandedNodes": [
|
"ExpandedNodes": [
|
||||||
"",
|
""
|
||||||
"\\database",
|
|
||||||
"\\database\\modelos"
|
|
||||||
],
|
],
|
||||||
"SelectedNode": "\\.sln",
|
"SelectedNode": "\\.sln",
|
||||||
"PreviewInSolutionExplorer": false
|
"PreviewInSolutionExplorer": false
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -308,6 +308,9 @@
|
|||||||
<Install>false</Install>
|
<Install>false</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<WCFMetadata Include="Connected Services\" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
+22
-25
@@ -101,32 +101,29 @@ namespace compabetov2.database
|
|||||||
List<Empleado> empleados = new List<Empleado>();
|
List<Empleado> empleados = new List<Empleado>();
|
||||||
|
|
||||||
using (SQLiteDataReader reader = DAO.conseguirEmpleadosDAO()) {
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
Empleado empleado = new Empleado(
|
||||||
|
int.Parse(reader["idempleado"].ToString()),
|
||||||
|
reader["nombre"].ToString(),
|
||||||
|
reader["apellidos"].ToString(),
|
||||||
|
reader["calle"].ToString(),
|
||||||
|
reader["fecha_contratacion"].ToString(),
|
||||||
|
reader["estado"].ToString(),
|
||||||
|
reader["colonia"].ToString(),
|
||||||
|
reader["cp"].ToString(),
|
||||||
|
reader["no_ext"].ToString(),
|
||||||
|
reader["no_int"].ToString(),
|
||||||
|
reader["referencia"].ToString(),
|
||||||
|
reader["fecha_nac"].ToString(),
|
||||||
|
reader["telefono"].ToString()
|
||||||
|
);
|
||||||
|
empleados.Add(empleado);
|
||||||
|
}
|
||||||
|
return empleados;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Generated
+109
-3
@@ -68,6 +68,19 @@
|
|||||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||||
this.empleadoBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
this.empleadoBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||||
this.conexionBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
this.conexionBindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||||
|
this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.Nombre = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.Apellidos = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.fecha_con = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.estado = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.calle = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.calonia = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.cp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.no_ext = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.no_int = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.referencia = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.fecha_nac = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.telefono = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
||||||
this.panel2.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
this.flowLayoutPanel1.SuspendLayout();
|
this.flowLayoutPanel1.SuspendLayout();
|
||||||
@@ -517,9 +530,23 @@
|
|||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dataGridView1.Location = new System.Drawing.Point(444, 75);
|
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
|
this.Id,
|
||||||
|
this.Nombre,
|
||||||
|
this.Apellidos,
|
||||||
|
this.fecha_con,
|
||||||
|
this.estado,
|
||||||
|
this.calle,
|
||||||
|
this.calonia,
|
||||||
|
this.cp,
|
||||||
|
this.no_ext,
|
||||||
|
this.no_int,
|
||||||
|
this.referencia,
|
||||||
|
this.fecha_nac,
|
||||||
|
this.telefono});
|
||||||
|
this.dataGridView1.Location = new System.Drawing.Point(258, 75);
|
||||||
this.dataGridView1.Name = "dataGridView1";
|
this.dataGridView1.Name = "dataGridView1";
|
||||||
this.dataGridView1.Size = new System.Drawing.Size(240, 150);
|
this.dataGridView1.Size = new System.Drawing.Size(1100, 150);
|
||||||
this.dataGridView1.TabIndex = 44;
|
this.dataGridView1.TabIndex = 44;
|
||||||
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
|
this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
|
||||||
//
|
//
|
||||||
@@ -531,11 +558,76 @@
|
|||||||
//
|
//
|
||||||
this.conexionBindingSource.DataSource = typeof(compabetov2.database.Conexion);
|
this.conexionBindingSource.DataSource = typeof(compabetov2.database.Conexion);
|
||||||
//
|
//
|
||||||
|
// Id
|
||||||
|
//
|
||||||
|
this.Id.HeaderText = "Id";
|
||||||
|
this.Id.Name = "Id";
|
||||||
|
//
|
||||||
|
// Nombre
|
||||||
|
//
|
||||||
|
this.Nombre.HeaderText = "Nombre";
|
||||||
|
this.Nombre.Name = "Nombre";
|
||||||
|
//
|
||||||
|
// Apellidos
|
||||||
|
//
|
||||||
|
this.Apellidos.HeaderText = "Apellidos";
|
||||||
|
this.Apellidos.Name = "Apellidos";
|
||||||
|
//
|
||||||
|
// fecha_con
|
||||||
|
//
|
||||||
|
this.fecha_con.HeaderText = "Fecha contratacion";
|
||||||
|
this.fecha_con.Name = "fecha_con";
|
||||||
|
//
|
||||||
|
// estado
|
||||||
|
//
|
||||||
|
this.estado.HeaderText = "Estado";
|
||||||
|
this.estado.Name = "estado";
|
||||||
|
//
|
||||||
|
// calle
|
||||||
|
//
|
||||||
|
this.calle.HeaderText = "Calle";
|
||||||
|
this.calle.Name = "calle";
|
||||||
|
//
|
||||||
|
// calonia
|
||||||
|
//
|
||||||
|
this.calonia.HeaderText = "Calonia";
|
||||||
|
this.calonia.Name = "calonia";
|
||||||
|
//
|
||||||
|
// cp
|
||||||
|
//
|
||||||
|
this.cp.HeaderText = "Cp";
|
||||||
|
this.cp.Name = "cp";
|
||||||
|
//
|
||||||
|
// no_ext
|
||||||
|
//
|
||||||
|
this.no_ext.HeaderText = "No. Exterior";
|
||||||
|
this.no_ext.Name = "no_ext";
|
||||||
|
//
|
||||||
|
// no_int
|
||||||
|
//
|
||||||
|
this.no_int.HeaderText = "No. Interior";
|
||||||
|
this.no_int.Name = "no_int";
|
||||||
|
//
|
||||||
|
// referencia
|
||||||
|
//
|
||||||
|
this.referencia.HeaderText = "Referencia";
|
||||||
|
this.referencia.Name = "referencia";
|
||||||
|
//
|
||||||
|
// fecha_nac
|
||||||
|
//
|
||||||
|
this.fecha_nac.HeaderText = "Fecha nacimiento";
|
||||||
|
this.fecha_nac.Name = "fecha_nac";
|
||||||
|
//
|
||||||
|
// telefono
|
||||||
|
//
|
||||||
|
this.telefono.HeaderText = "Telefono";
|
||||||
|
this.telefono.Name = "telefono";
|
||||||
|
//
|
||||||
// personal
|
// personal
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1028, 609);
|
this.ClientSize = new System.Drawing.Size(1370, 609);
|
||||||
this.Controls.Add(this.dataGridView1);
|
this.Controls.Add(this.dataGridView1);
|
||||||
this.Controls.Add(this.label12);
|
this.Controls.Add(this.label12);
|
||||||
this.Controls.Add(this.button9);
|
this.Controls.Add(this.button9);
|
||||||
@@ -570,6 +662,7 @@
|
|||||||
this.Name = "personal";
|
this.Name = "personal";
|
||||||
this.Text = "personal";
|
this.Text = "personal";
|
||||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
this.Load += new System.EventHandler(this.personal_Load);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
||||||
this.panel2.ResumeLayout(false);
|
this.panel2.ResumeLayout(false);
|
||||||
this.panel2.PerformLayout();
|
this.panel2.PerformLayout();
|
||||||
@@ -623,5 +716,18 @@
|
|||||||
private System.Windows.Forms.DataGridView dataGridView1;
|
private System.Windows.Forms.DataGridView dataGridView1;
|
||||||
private System.Windows.Forms.BindingSource conexionBindingSource;
|
private System.Windows.Forms.BindingSource conexionBindingSource;
|
||||||
private System.Windows.Forms.BindingSource empleadoBindingSource;
|
private System.Windows.Forms.BindingSource empleadoBindingSource;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn Id;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn Nombre;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn Apellidos;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn fecha_con;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn estado;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn calle;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn calonia;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn cp;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn no_ext;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn no_int;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn referencia;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn fecha_nac;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn telefono;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+23
-1
@@ -54,7 +54,29 @@ namespace compabetov2
|
|||||||
private void llenarGrid()
|
private void llenarGrid()
|
||||||
{
|
{
|
||||||
List<Empleado> empleados = service.conseguirEmpleados();
|
List<Empleado> empleados = service.conseguirEmpleados();
|
||||||
//dataGridView1.DataSource = empleados;
|
empleados.Reverse();
|
||||||
|
foreach(Empleado empleado in empleados)
|
||||||
|
{
|
||||||
|
dataGridView1.Rows.Insert(0,
|
||||||
|
empleado.idempleado,
|
||||||
|
empleado.nombre,
|
||||||
|
empleado.apellidos,
|
||||||
|
empleado.fecha_contratacion,
|
||||||
|
empleado.estado,
|
||||||
|
empleado.calle,
|
||||||
|
empleado.colonia,
|
||||||
|
empleado.cp,
|
||||||
|
empleado.no_ext,
|
||||||
|
empleado.no_int,
|
||||||
|
empleado.referencia,
|
||||||
|
empleado.fecha_nac,
|
||||||
|
empleado.telefono);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void personal_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,6 +117,45 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Nombre.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Apellidos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="fecha_con.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="estado.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="calle.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="calonia.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="cp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="no_ext.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="no_int.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="referencia.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="fecha_nac.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="telefono.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="empleadoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="empleadoBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>197, 17</value>
|
<value>197, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
Reference in New Issue
Block a user