--
This commit is contained in:
@@ -1857,6 +1857,73 @@ namespace WCF_Checador
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")]
|
||||
[System.Runtime.Serialization.DataContractAttribute(Name="RequestPersonalChecadorID", Namespace="http://schemas.datacontract.org/2004/07/ADSUtileriasService.Conexion.SIG")]
|
||||
public partial class RequestPersonalChecadorID : object
|
||||
{
|
||||
|
||||
private string ChecadorIDField;
|
||||
|
||||
private int CveChecadorField;
|
||||
|
||||
private int CveEmpresaField;
|
||||
|
||||
private int CvePersonalField;
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public string ChecadorID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ChecadorIDField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ChecadorIDField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public int CveChecador
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CveChecadorField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CveChecadorField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public int CveEmpresa
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CveEmpresaField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CveEmpresaField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public int CvePersonal
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CvePersonalField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CvePersonalField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")]
|
||||
[System.Runtime.Serialization.DataContractAttribute(Name="PersonalChecadorIDResponse", Namespace="http://schemas.datacontract.org/2004/07/ADSUtileriasService.Conexion.SIG")]
|
||||
@@ -4051,6 +4118,88 @@ namespace WCF_Checador
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")]
|
||||
[System.Runtime.Serialization.DataContractAttribute(Name="RequestPersonalChecadorVinculoAddUp", Namespace="http://schemas.datacontract.org/2004/07/ADSUtileriasService.Conexion.SIG")]
|
||||
public partial class RequestPersonalChecadorVinculoAddUp : object
|
||||
{
|
||||
|
||||
private string ChecadorIDField;
|
||||
|
||||
private string ChecadornameField;
|
||||
|
||||
private int CveChecadorField;
|
||||
|
||||
private int CveEmpresaField;
|
||||
|
||||
private int CvePersonalField;
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public string ChecadorID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ChecadorIDField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ChecadorIDField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public string Checadorname
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ChecadornameField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.ChecadornameField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public int CveChecador
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CveChecadorField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CveChecadorField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public int CveEmpresa
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CveEmpresaField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CveEmpresaField = value;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Runtime.Serialization.DataMemberAttribute()]
|
||||
public int CvePersonal
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CvePersonalField;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CvePersonalField = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")]
|
||||
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="WCF_Checador.IChecadorService")]
|
||||
public interface IChecadorService
|
||||
@@ -4075,10 +4224,10 @@ namespace WCF_Checador
|
||||
System.Threading.Tasks.Task<WCF_Checador.PersonalChecador[]> GetChecadorEmpleadoAsync(int CveChecador, int CveEmpresa);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IChecadorService/PersonalChecadorID", ReplyAction="http://tempuri.org/IChecadorService/PersonalChecadorIDResponse")]
|
||||
WCF_Checador.PersonalChecadorIDResponse[] PersonalChecadorID(int CveChecador);
|
||||
WCF_Checador.PersonalChecadorIDResponse[] PersonalChecadorID(WCF_Checador.RequestPersonalChecadorID request);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IChecadorService/PersonalChecadorID", ReplyAction="http://tempuri.org/IChecadorService/PersonalChecadorIDResponse")]
|
||||
System.Threading.Tasks.Task<WCF_Checador.PersonalChecadorIDResponse[]> PersonalChecadorIDAsync(int CveChecador);
|
||||
System.Threading.Tasks.Task<WCF_Checador.PersonalChecadorIDResponse[]> PersonalChecadorIDAsync(WCF_Checador.RequestPersonalChecadorID request);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IChecadorService/SetPersonalChecador", ReplyAction="http://tempuri.org/IChecadorService/SetPersonalChecadorResponse")]
|
||||
bool SetPersonalChecador(WCF_Checador.RequestPersonalChecadorUp[] empleados, int CveEmpresa);
|
||||
@@ -4103,6 +4252,12 @@ namespace WCF_Checador
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IChecadorService/GetSubProyectos", ReplyAction="http://tempuri.org/IChecadorService/GetSubProyectosResponse")]
|
||||
System.Threading.Tasks.Task<WCF_Checador.ResponseSubProyectoUsuario[]> GetSubProyectosAsync(WCF_Checador.RequestSubProyectoUsuario parames);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IChecadorService/AddUpPersonalChecadorVinculo", ReplyAction="http://tempuri.org/IChecadorService/AddUpPersonalChecadorVinculoResponse")]
|
||||
bool AddUpPersonalChecadorVinculo(WCF_Checador.RequestPersonalChecadorVinculoAddUp request);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IChecadorService/AddUpPersonalChecadorVinculo", ReplyAction="http://tempuri.org/IChecadorService/AddUpPersonalChecadorVinculoResponse")]
|
||||
System.Threading.Tasks.Task<bool> AddUpPersonalChecadorVinculoAsync(WCF_Checador.RequestPersonalChecadorVinculoAddUp request);
|
||||
}
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "8.0.0")]
|
||||
@@ -4185,14 +4340,14 @@ namespace WCF_Checador
|
||||
return base.Channel.GetChecadorEmpleadoAsync(CveChecador, CveEmpresa);
|
||||
}
|
||||
|
||||
public WCF_Checador.PersonalChecadorIDResponse[] PersonalChecadorID(int CveChecador)
|
||||
public WCF_Checador.PersonalChecadorIDResponse[] PersonalChecadorID(WCF_Checador.RequestPersonalChecadorID request)
|
||||
{
|
||||
return base.Channel.PersonalChecadorID(CveChecador);
|
||||
return base.Channel.PersonalChecadorID(request);
|
||||
}
|
||||
|
||||
public System.Threading.Tasks.Task<WCF_Checador.PersonalChecadorIDResponse[]> PersonalChecadorIDAsync(int CveChecador)
|
||||
public System.Threading.Tasks.Task<WCF_Checador.PersonalChecadorIDResponse[]> PersonalChecadorIDAsync(WCF_Checador.RequestPersonalChecadorID request)
|
||||
{
|
||||
return base.Channel.PersonalChecadorIDAsync(CveChecador);
|
||||
return base.Channel.PersonalChecadorIDAsync(request);
|
||||
}
|
||||
|
||||
public bool SetPersonalChecador(WCF_Checador.RequestPersonalChecadorUp[] empleados, int CveEmpresa)
|
||||
@@ -4235,6 +4390,16 @@ namespace WCF_Checador
|
||||
return base.Channel.GetSubProyectosAsync(parames);
|
||||
}
|
||||
|
||||
public bool AddUpPersonalChecadorVinculo(WCF_Checador.RequestPersonalChecadorVinculoAddUp request)
|
||||
{
|
||||
return base.Channel.AddUpPersonalChecadorVinculo(request);
|
||||
}
|
||||
|
||||
public System.Threading.Tasks.Task<bool> AddUpPersonalChecadorVinculoAsync(WCF_Checador.RequestPersonalChecadorVinculoAddUp request)
|
||||
{
|
||||
return base.Channel.AddUpPersonalChecadorVinculoAsync(request);
|
||||
}
|
||||
|
||||
public virtual System.Threading.Tasks.Task OpenAsync()
|
||||
{
|
||||
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using ADSNetLibrary.SIGAPI.Models.RH.Request;
|
||||
using ADSUtileriasWF.Views.RelojChecador.Gluyas;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
@@ -134,12 +136,12 @@ namespace ADSUtileriasWF.Helpers
|
||||
|
||||
|
||||
|
||||
public static WCF_Checador.PersonalChecadorIDResponse[] PersonalChecadorID(int CveChecador )
|
||||
public static WCF_Checador.PersonalChecadorIDResponse[] PersonalChecadorID(int CveChecador,int CvePersonal =-1,string ChecadorID = "-1")
|
||||
{
|
||||
try
|
||||
{
|
||||
WCF_Checador.ChecadorServiceClient client = new WCF_Checador.ChecadorServiceClient();// new WCF_Service.ChecadorServiceClient(WCF_Service.ChecadorServiceClient.EndpointConfiguration.BasicHttpBinding_IChecadorService, ModVarsPV.Address);
|
||||
return client.PersonalChecadorID(CveChecador);
|
||||
WCF_Checador.ChecadorServiceClient client = new WCF_Checador.ChecadorServiceClient();
|
||||
return client.PersonalChecadorID(new WCF_Checador.RequestPersonalChecadorID() { CvePersonal = CvePersonal, ChecadorID = ChecadorID, CveChecador = CveChecador });
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -149,6 +151,21 @@ namespace ADSUtileriasWF.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
public static bool AddUpPersonalChecadorVinculo(WCF_Checador.RequestPersonalChecadorVinculoAddUp request)
|
||||
{
|
||||
try
|
||||
{
|
||||
WCF_Checador.ChecadorServiceClient client = new WCF_Checador.ChecadorServiceClient();// new WCF_Service.ChecadorServiceClient(WCF_Service.ChecadorServiceClient.EndpointConfiguration.BasicHttpBinding_IChecadorService, ModVarsPV.Address);
|
||||
return client.AddUpPersonalChecadorVinculo(request);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
GuardaLog(string.Format("Ocurrió un error al iniciar el servicio\r\n{0}", e));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
DGVPersonalChecador = new System.Windows.Forms.DataGridView();
|
||||
dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
ChecadorID = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
CvePersonal = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
CodigoNombreCompleto = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
LblEmpleado = new System.Windows.Forms.Label();
|
||||
GBoxHuellas = new System.Windows.Forms.GroupBox();
|
||||
btnCancelar = new System.Windows.Forms.Button();
|
||||
@@ -62,21 +68,16 @@
|
||||
chkMostrarTodos = new System.Windows.Forms.CheckBox();
|
||||
tabvalidacion = new System.Windows.Forms.TabPage();
|
||||
LblChecadorseleccionado = new System.Windows.Forms.Label();
|
||||
dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
label1 = new System.Windows.Forms.Label();
|
||||
Ddlchecador = new System.Windows.Forms.ComboBox();
|
||||
panel1 = new System.Windows.Forms.Panel();
|
||||
PnlVinvular = new System.Windows.Forms.Panel();
|
||||
DdlEmpleadosVinculo = new System.Windows.Forms.ComboBox();
|
||||
button2 = new System.Windows.Forms.Button();
|
||||
TxtNombrevinculo = new System.Windows.Forms.TextBox();
|
||||
BtnVincularChecadorSig = new System.Windows.Forms.Button();
|
||||
TxtIDChecador = new System.Windows.Forms.TextBox();
|
||||
TxtNombreRegistro = new System.Windows.Forms.TextBox();
|
||||
lblregistrochecador = new System.Windows.Forms.Label();
|
||||
label2 = new System.Windows.Forms.Label();
|
||||
dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
ChecadorID = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
CvePersonal = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
CodigoNombreCompleto = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
((System.ComponentModel.ISupportInitialize)DGVPersonalChecador).BeginInit();
|
||||
GBoxHuellas.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)Huella3).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)Huella2).BeginInit();
|
||||
@@ -86,10 +87,62 @@
|
||||
tabpanel.SuspendLayout();
|
||||
tabRegistro.SuspendLayout();
|
||||
tabvalidacion.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).BeginInit();
|
||||
panel1.SuspendLayout();
|
||||
PnlVinvular.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// DGVPersonalChecador
|
||||
//
|
||||
DGVPersonalChecador.AllowUserToAddRows = false;
|
||||
DGVPersonalChecador.AllowUserToDeleteRows = false;
|
||||
DGVPersonalChecador.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
DGVPersonalChecador.BackgroundColor = System.Drawing.SystemColors.ActiveCaption;
|
||||
DGVPersonalChecador.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
DGVPersonalChecador.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { dataGridViewTextBoxColumn1, ChecadorID, dataGridViewTextBoxColumn2, CvePersonal, CodigoNombreCompleto });
|
||||
DGVPersonalChecador.Location = new System.Drawing.Point(16, 64);
|
||||
DGVPersonalChecador.Name = "DGVPersonalChecador";
|
||||
DGVPersonalChecador.RowHeadersVisible = false;
|
||||
DGVPersonalChecador.Size = new System.Drawing.Size(843, 246);
|
||||
DGVPersonalChecador.TabIndex = 23;
|
||||
DGVPersonalChecador.CellClick += DGVPersonalChecador_CellClick;
|
||||
//
|
||||
// dataGridViewTextBoxColumn1
|
||||
//
|
||||
dataGridViewTextBoxColumn1.DataPropertyName = "cveChecador";
|
||||
dataGridViewTextBoxColumn1.HeaderText = "CveChecador";
|
||||
dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
|
||||
dataGridViewTextBoxColumn1.ReadOnly = true;
|
||||
dataGridViewTextBoxColumn1.Visible = false;
|
||||
//
|
||||
// ChecadorID
|
||||
//
|
||||
ChecadorID.DataPropertyName = "dwEnrollNumber";
|
||||
ChecadorID.FillWeight = 30F;
|
||||
ChecadorID.HeaderText = "ID Checador";
|
||||
ChecadorID.Name = "ChecadorID";
|
||||
ChecadorID.ReadOnly = true;
|
||||
//
|
||||
// dataGridViewTextBoxColumn2
|
||||
//
|
||||
dataGridViewTextBoxColumn2.DataPropertyName = "Name";
|
||||
dataGridViewTextBoxColumn2.HeaderText = "Empleado Checador";
|
||||
dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
|
||||
dataGridViewTextBoxColumn2.ReadOnly = true;
|
||||
//
|
||||
// CvePersonal
|
||||
//
|
||||
CvePersonal.DataPropertyName = "CvePersonal";
|
||||
CvePersonal.HeaderText = "CvePersonal";
|
||||
CvePersonal.Name = "CvePersonal";
|
||||
CvePersonal.ReadOnly = true;
|
||||
CvePersonal.Visible = false;
|
||||
//
|
||||
// CodigoNombreCompleto
|
||||
//
|
||||
CodigoNombreCompleto.DataPropertyName = "NombrePersonal";
|
||||
CodigoNombreCompleto.HeaderText = "Empleado Sig";
|
||||
CodigoNombreCompleto.Name = "CodigoNombreCompleto";
|
||||
CodigoNombreCompleto.ReadOnly = true;
|
||||
//
|
||||
// LblEmpleado
|
||||
//
|
||||
LblEmpleado.AutoSize = true;
|
||||
@@ -235,6 +288,7 @@
|
||||
DdlEmpleados.Size = new System.Drawing.Size(671, 23);
|
||||
DdlEmpleados.TabIndex = 2;
|
||||
DdlEmpleados.ValueMember = "CvePersonal";
|
||||
DdlEmpleados.SelectedIndexChanged += DdlEmpleados_SelectedIndexChanged;
|
||||
//
|
||||
// DGVChecadores
|
||||
//
|
||||
@@ -354,6 +408,7 @@
|
||||
tabRegistro.TabIndex = 0;
|
||||
tabRegistro.Text = "Registro";
|
||||
tabRegistro.UseVisualStyleBackColor = true;
|
||||
tabRegistro.Click += tabRegistro_Click;
|
||||
//
|
||||
// btnmostarcontroles
|
||||
//
|
||||
@@ -464,10 +519,10 @@
|
||||
// tabvalidacion
|
||||
//
|
||||
tabvalidacion.Controls.Add(LblChecadorseleccionado);
|
||||
tabvalidacion.Controls.Add(dataGridView1);
|
||||
tabvalidacion.Controls.Add(DGVPersonalChecador);
|
||||
tabvalidacion.Controls.Add(label1);
|
||||
tabvalidacion.Controls.Add(Ddlchecador);
|
||||
tabvalidacion.Controls.Add(panel1);
|
||||
tabvalidacion.Controls.Add(PnlVinvular);
|
||||
tabvalidacion.Location = new System.Drawing.Point(4, 24);
|
||||
tabvalidacion.Name = "tabvalidacion";
|
||||
tabvalidacion.Padding = new System.Windows.Forms.Padding(3);
|
||||
@@ -485,20 +540,6 @@
|
||||
LblChecadorseleccionado.TabIndex = 20;
|
||||
LblChecadorseleccionado.Text = "Seleccione un checador para validar usuarios";
|
||||
//
|
||||
// dataGridView1
|
||||
//
|
||||
dataGridView1.AllowUserToAddRows = false;
|
||||
dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
dataGridView1.BackgroundColor = System.Drawing.SystemColors.ActiveCaption;
|
||||
dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { dataGridViewTextBoxColumn1, ChecadorID, dataGridViewTextBoxColumn2, CvePersonal, CodigoNombreCompleto });
|
||||
dataGridView1.Location = new System.Drawing.Point(16, 64);
|
||||
dataGridView1.Name = "dataGridView1";
|
||||
dataGridView1.RowHeadersVisible = false;
|
||||
dataGridView1.Size = new System.Drawing.Size(843, 185);
|
||||
dataGridView1.TabIndex = 23;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
@@ -519,65 +560,65 @@
|
||||
Ddlchecador.ValueMember = "CveChecador";
|
||||
Ddlchecador.SelectedIndexChanged += Ddlchecador_SelectedIndexChanged;
|
||||
//
|
||||
// panel1
|
||||
// PnlVinvular
|
||||
//
|
||||
panel1.Controls.Add(DdlEmpleadosVinculo);
|
||||
panel1.Controls.Add(button2);
|
||||
panel1.Controls.Add(TxtNombrevinculo);
|
||||
panel1.Controls.Add(TxtNombreRegistro);
|
||||
panel1.Controls.Add(lblregistrochecador);
|
||||
panel1.Controls.Add(label2);
|
||||
panel1.Location = new System.Drawing.Point(16, 255);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Size = new System.Drawing.Size(843, 183);
|
||||
panel1.TabIndex = 21;
|
||||
panel1.Visible = false;
|
||||
PnlVinvular.Controls.Add(DdlEmpleadosVinculo);
|
||||
PnlVinvular.Controls.Add(BtnVincularChecadorSig);
|
||||
PnlVinvular.Controls.Add(TxtIDChecador);
|
||||
PnlVinvular.Controls.Add(TxtNombreRegistro);
|
||||
PnlVinvular.Controls.Add(lblregistrochecador);
|
||||
PnlVinvular.Controls.Add(label2);
|
||||
PnlVinvular.Location = new System.Drawing.Point(16, 316);
|
||||
PnlVinvular.Name = "PnlVinvular";
|
||||
PnlVinvular.Size = new System.Drawing.Size(843, 122);
|
||||
PnlVinvular.TabIndex = 21;
|
||||
PnlVinvular.Visible = false;
|
||||
//
|
||||
// DdlEmpleadosVinculo
|
||||
//
|
||||
DdlEmpleadosVinculo.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
|
||||
DdlEmpleadosVinculo.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
DdlEmpleadosVinculo.DisplayMember = "CodigoNombreCompleto";
|
||||
DdlEmpleadosVinculo.Enabled = false;
|
||||
DdlEmpleadosVinculo.FormattingEnabled = true;
|
||||
DdlEmpleadosVinculo.Location = new System.Drawing.Point(25, 135);
|
||||
DdlEmpleadosVinculo.Location = new System.Drawing.Point(11, 74);
|
||||
DdlEmpleadosVinculo.Name = "DdlEmpleadosVinculo";
|
||||
DdlEmpleadosVinculo.Size = new System.Drawing.Size(452, 23);
|
||||
DdlEmpleadosVinculo.TabIndex = 20;
|
||||
DdlEmpleadosVinculo.ValueMember = "CvePersonal";
|
||||
//
|
||||
// button2
|
||||
// BtnVincularChecadorSig
|
||||
//
|
||||
button2.BackColor = System.Drawing.Color.FromArgb(43, 54, 67);
|
||||
button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
button2.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
button2.Location = new System.Drawing.Point(716, 148);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new System.Drawing.Size(108, 32);
|
||||
button2.TabIndex = 19;
|
||||
button2.Text = "Vincular";
|
||||
button2.UseVisualStyleBackColor = false;
|
||||
button2.Click += button2_Click;
|
||||
BtnVincularChecadorSig.BackColor = System.Drawing.Color.FromArgb(43, 54, 67);
|
||||
BtnVincularChecadorSig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
BtnVincularChecadorSig.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
BtnVincularChecadorSig.Location = new System.Drawing.Point(732, 65);
|
||||
BtnVincularChecadorSig.Name = "BtnVincularChecadorSig";
|
||||
BtnVincularChecadorSig.Size = new System.Drawing.Size(108, 32);
|
||||
BtnVincularChecadorSig.TabIndex = 19;
|
||||
BtnVincularChecadorSig.Text = "Vincular";
|
||||
BtnVincularChecadorSig.UseVisualStyleBackColor = false;
|
||||
BtnVincularChecadorSig.Click += BtnVincularChecadorSig_Click;
|
||||
//
|
||||
// TxtNombrevinculo
|
||||
// TxtIDChecador
|
||||
//
|
||||
TxtNombrevinculo.Location = new System.Drawing.Point(629, 91);
|
||||
TxtNombrevinculo.Name = "TxtNombrevinculo";
|
||||
TxtNombrevinculo.Size = new System.Drawing.Size(67, 23);
|
||||
TxtNombrevinculo.TabIndex = 18;
|
||||
TxtNombrevinculo.Visible = false;
|
||||
TxtIDChecador.Enabled = false;
|
||||
TxtIDChecador.Location = new System.Drawing.Point(9, 30);
|
||||
TxtIDChecador.Name = "TxtIDChecador";
|
||||
TxtIDChecador.Size = new System.Drawing.Size(67, 23);
|
||||
TxtIDChecador.TabIndex = 18;
|
||||
//
|
||||
// TxtNombreRegistro
|
||||
//
|
||||
TxtNombreRegistro.Location = new System.Drawing.Point(23, 91);
|
||||
TxtNombreRegistro.Enabled = false;
|
||||
TxtNombreRegistro.Location = new System.Drawing.Point(101, 30);
|
||||
TxtNombreRegistro.Name = "TxtNombreRegistro";
|
||||
TxtNombreRegistro.Size = new System.Drawing.Size(447, 23);
|
||||
TxtNombreRegistro.Size = new System.Drawing.Size(362, 23);
|
||||
TxtNombreRegistro.TabIndex = 17;
|
||||
//
|
||||
// lblregistrochecador
|
||||
//
|
||||
lblregistrochecador.AutoSize = true;
|
||||
lblregistrochecador.Location = new System.Drawing.Point(23, 72);
|
||||
lblregistrochecador.Location = new System.Drawing.Point(9, 11);
|
||||
lblregistrochecador.Name = "lblregistrochecador";
|
||||
lblregistrochecador.Size = new System.Drawing.Size(168, 15);
|
||||
lblregistrochecador.TabIndex = 15;
|
||||
@@ -586,50 +627,12 @@
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new System.Drawing.Point(23, 117);
|
||||
label2.Location = new System.Drawing.Point(9, 56);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new System.Drawing.Size(123, 15);
|
||||
label2.TabIndex = 16;
|
||||
label2.Text = "Vinculado al personal:";
|
||||
//
|
||||
// dataGridViewTextBoxColumn1
|
||||
//
|
||||
dataGridViewTextBoxColumn1.DataPropertyName = "cveChecador";
|
||||
dataGridViewTextBoxColumn1.HeaderText = "CveChecador";
|
||||
dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
|
||||
dataGridViewTextBoxColumn1.ReadOnly = true;
|
||||
dataGridViewTextBoxColumn1.Visible = false;
|
||||
//
|
||||
// ChecadorID
|
||||
//
|
||||
ChecadorID.DataPropertyName = "ChecadorID";
|
||||
ChecadorID.FillWeight = 30F;
|
||||
ChecadorID.HeaderText = "ID Checador";
|
||||
ChecadorID.Name = "ChecadorID";
|
||||
ChecadorID.ReadOnly = true;
|
||||
//
|
||||
// dataGridViewTextBoxColumn2
|
||||
//
|
||||
dataGridViewTextBoxColumn2.DataPropertyName = "checador";
|
||||
dataGridViewTextBoxColumn2.HeaderText = "Empleado Checador";
|
||||
dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
|
||||
dataGridViewTextBoxColumn2.ReadOnly = true;
|
||||
//
|
||||
// CvePersonal
|
||||
//
|
||||
CvePersonal.DataPropertyName = "cvePersonal";
|
||||
CvePersonal.HeaderText = "CvePersonal";
|
||||
CvePersonal.Name = "CvePersonal";
|
||||
CvePersonal.ReadOnly = true;
|
||||
CvePersonal.Visible = false;
|
||||
//
|
||||
// CodigoNombreCompleto
|
||||
//
|
||||
CodigoNombreCompleto.DataPropertyName = "CodigoNombreCompleto";
|
||||
CodigoNombreCompleto.HeaderText = "Empleado Sig";
|
||||
CodigoNombreCompleto.Name = "CodigoNombreCompleto";
|
||||
CodigoNombreCompleto.ReadOnly = true;
|
||||
//
|
||||
// FrmNewPersonalChecador
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
@@ -639,6 +642,7 @@
|
||||
Name = "FrmNewPersonalChecador";
|
||||
Text = "FrmNewPersonalChecador";
|
||||
Load += FrmNewPersonalChecador_Load;
|
||||
((System.ComponentModel.ISupportInitialize)DGVPersonalChecador).EndInit();
|
||||
GBoxHuellas.ResumeLayout(false);
|
||||
GBoxHuellas.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)Huella3).EndInit();
|
||||
@@ -651,9 +655,8 @@
|
||||
tabRegistro.PerformLayout();
|
||||
tabvalidacion.ResumeLayout(false);
|
||||
tabvalidacion.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView1).EndInit();
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
PnlVinvular.ResumeLayout(false);
|
||||
PnlVinvular.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -687,16 +690,16 @@
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label lblregistrochecador;
|
||||
private System.Windows.Forms.ComboBox Ddlchecador;
|
||||
private System.Windows.Forms.TextBox TxtNombrevinculo;
|
||||
private System.Windows.Forms.TextBox TxtIDChecador;
|
||||
private System.Windows.Forms.Label LblChecadorseleccionado;
|
||||
private FontAwesome.Sharp.IconButton BtnCancelar;
|
||||
private System.Windows.Forms.CheckBox ChkVincularsinhuella;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox ddlChek;
|
||||
private System.Windows.Forms.CheckBox chkMostrarTodos;
|
||||
private System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.DataGridView DGVPersonalChecador;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel PnlVinvular;
|
||||
private System.Windows.Forms.Button BtnVincular;
|
||||
private System.Windows.Forms.Button btnCancelar;
|
||||
private System.Windows.Forms.Button BtnActualizar;
|
||||
@@ -707,7 +710,7 @@
|
||||
private System.Windows.Forms.TextBox TxtPersonal;
|
||||
private System.Windows.Forms.TextBox TxtCodigo;
|
||||
private System.Windows.Forms.Button btnmostarcontroles;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button BtnVincularChecadorSig;
|
||||
private System.Windows.Forms.ComboBox DdlEmpleadosVinculo;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ChecadorID;
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
List<UtileriasServiceWCF.PersonalChecadorsqliteModel> empleadoschecador;
|
||||
SDKZkTeckoHelper lib = new SDKZkTeckoHelper();
|
||||
SDKZkTeckoHelper libvalidacion = new SDKZkTeckoHelper();
|
||||
ResponseUser currentUsuario;
|
||||
public FrmNewPersonalChecador()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -149,10 +150,10 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
//CargaPersonal();
|
||||
}
|
||||
private void CargaChecadores()
|
||||
{
|
||||
{
|
||||
UtileriasServiceWCF.ResponseGetChecadoresModel[] checklist = Servicecon.GetChecadores(ModVarsPV.UserV2.CveUsuario.ToString().ToEntero(), ModVarsPV.UserV2.CveSubProyecto.ToString().ToEntero(), ModVarsPV.UserV2.CveEmpresa.ToString().ToEntero());
|
||||
|
||||
|
||||
|
||||
|
||||
List<UtileriasServiceWCF.ResponseGetChecadoresModel> checklistcopy =
|
||||
checklist
|
||||
.Select(x => new UtileriasServiceWCF.ResponseGetChecadoresModel
|
||||
@@ -174,7 +175,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
.ToList();
|
||||
List<UtileriasServiceWCF.ResponseGetChecadoresModel> checklist2 = checklistcopy.ToList();
|
||||
checklist2.Add(new UtileriasServiceWCF.ResponseGetChecadoresModel() { checador = "Dispositivo USB", cveChecador = -1 });
|
||||
|
||||
|
||||
this.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
Ddlchecador.DataSource = checklist;
|
||||
@@ -184,7 +185,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
ddlChek.DataSource = checklist2;
|
||||
ddlChek.Refresh();
|
||||
DGVChecadores.Refresh();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
@@ -264,13 +265,23 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
if (empleados.Count > 0)
|
||||
{
|
||||
int cvePersonal = empleados[0].CvePersonal;
|
||||
|
||||
WCF_Checador.PersonalChecadorIDResponse[] personalchecador = Servicecon.PersonalChecadorID(-1, cvePersonal);
|
||||
|
||||
foreach (DataGridViewRow row in DGVChecadores.Rows)
|
||||
{
|
||||
DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)(row.Cells[0]);
|
||||
DataGridViewCheckBoxCell chkv = (DataGridViewCheckBoxCell)(row.Cells[4]);
|
||||
|
||||
|
||||
chkv.Value = false;
|
||||
chk.Value = false;
|
||||
|
||||
|
||||
int cveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero();
|
||||
if (empleadoschecador.FindAll(x => x.CvePersonal == cvePersonal && x.CveChecador == cveChecador).Count > 0)
|
||||
{
|
||||
// if (empleadoschecador.FindAll(x => x.CvePersonal == cvePersonal && x.CveChecador == cveChecador).Count > 0)
|
||||
if (personalchecador.ToList().FindAll(x => x.CvePersonal == cvePersonal && x.CveChecador == cveChecador).Count > 0)
|
||||
{
|
||||
chkv.Value = true;
|
||||
chk.Value = true;
|
||||
}
|
||||
@@ -319,43 +330,13 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
foreach (DataGridViewRow row in DGVChecadores.Rows)
|
||||
{
|
||||
DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)(row.Cells[0]);
|
||||
if (!(chk.Value == chk.FalseValue || chk.Value == null))
|
||||
{
|
||||
|
||||
string checador = row.Cells["checador"].Value.ToString();
|
||||
if (checadorconected == 0)
|
||||
{
|
||||
|
||||
iPLocal = row.Cells["iPLocal"].Value.ToString();
|
||||
puerto = row.Cells["puerto"].Value.ToString();
|
||||
zkemkeeper.CZKEM conectarse = new zkemkeeper.CZKEM();
|
||||
if (conectarse.Connect_Net(iPLocal, puerto.ToEntero()))
|
||||
{ checadorconected++; CveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero(); conectarse.Disconnect(); }
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
cellselected++;
|
||||
}
|
||||
}*/
|
||||
//lib.
|
||||
/*
|
||||
if (cellselected == 0)
|
||||
{
|
||||
ModExtensiones.Alert("Debe seleccionar un checador para vincular las huellas", "Información", MessageBoxButtons.OK);
|
||||
|
||||
}
|
||||
else*/
|
||||
|
||||
{
|
||||
|
||||
bool conected = lib.GetConnectState();
|
||||
iPLocal = ((UtileriasServiceWCF.ResponseGetChecadoresModel)ddlChek.SelectedItem).iPLocal;
|
||||
puerto = ((UtileriasServiceWCF.ResponseGetChecadoresModel)ddlChek.SelectedItem).puerto;
|
||||
UtileriasServiceWCF.ResponseGetChecadoresModel currentchecador = ((UtileriasServiceWCF.ResponseGetChecadoresModel)ddlChek.SelectedItem);
|
||||
iPLocal = currentchecador.iPLocal;
|
||||
puerto = currentchecador.puerto;
|
||||
|
||||
if (conected)
|
||||
{
|
||||
@@ -398,12 +379,14 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
List<int> listUserenroll = new List<int>();
|
||||
|
||||
|
||||
WCF_Checador.PersonalChecadorIDResponse[] personalchecador = Servicecon.PersonalChecadorID(currentchecador.cveChecador,CvePersonal);
|
||||
var personalsig = personalchecador.ToList().FirstOrDefault(x => x.CvePersonal == CvePersonal);
|
||||
foreach (var item in usuarios)
|
||||
{
|
||||
ciclos = ciclos + 1;
|
||||
userenroll = item.dwEnrollNumber.ToEntero();
|
||||
listUserenroll.Add(userenroll);
|
||||
if (item.Password.ToEntero() == CvePersonal)
|
||||
if (personalsig!=null && item.dwEnrollNumber == personalsig.ChecadorID )
|
||||
{
|
||||
enrollnumber = item.dwEnrollNumber.ToEntero();
|
||||
huellasid = item.dwEnrollNumber;
|
||||
@@ -437,7 +420,14 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
|
||||
if (lib.sta_SetUserInfo(enrollnumber.ToString(), empleado.NombreCompleto, 0, CvePersonal.ToString(), CvePersonal.ToString()) > 0)
|
||||
{
|
||||
isregister = true;
|
||||
|
||||
isregister = Servicecon.AddUpPersonalChecadorVinculo(new WCF_Checador.RequestPersonalChecadorVinculoAddUp()
|
||||
{
|
||||
ChecadorID = enrollnumber.ToString(),
|
||||
CvePersonal = CvePersonal,
|
||||
CveChecador = currentchecador.cveChecador,
|
||||
Checadorname = empleado.NombreCompleto
|
||||
});
|
||||
huellasid = enrollnumber.ToString();
|
||||
}
|
||||
#endregion
|
||||
@@ -603,15 +593,16 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
|
||||
string iPLocal = row.Cells["iPLocal"].Value.ToString();
|
||||
string puerto = row.Cells["puerto"].Value.ToString();
|
||||
int cveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero();
|
||||
SDKZkTeckoHelper templib = null;
|
||||
if (lib.iP_Port == string.Format("{0}_{1}", iPLocal, puerto))
|
||||
{
|
||||
templib = lib;
|
||||
}
|
||||
int enrollnumber = SaveHuellas(iPLocal, puerto, CvePersonal, templib);
|
||||
int enrollnumber = SaveHuellas(iPLocal, puerto, CvePersonal, templib,cveChecador);
|
||||
msg = $"{msg}con el código de empleado '{enrollnumber}'.";
|
||||
if (enrollnumber > 0) { enrollnumberb = enrollnumber; chkv.Value = true; }
|
||||
checkadores.Add(new UtileriasServiceWCF.PersonalChecadorUPsqliteModel() { id = enrollnumber, CveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero() });
|
||||
checkadores.Add(new UtileriasServiceWCF.PersonalChecadorUPsqliteModel() { id = enrollnumber, CveChecador = cveChecador });
|
||||
}
|
||||
}
|
||||
Servicecon.SetPersonalHuella(new UtileriasServiceWCF.RequestPersonalHuella() { Huella = huellaFinal, CvePersonal = CvePersonal, CveEmpresa = UsuarioActual.CveEmpresa, CveUsuario = UsuarioActual.CveUsuario, CveChecador = CveChecador });
|
||||
@@ -654,7 +645,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
|
||||
}
|
||||
|
||||
public int SaveHuellas(string iPLocal, string puerto, int CvePersonal, SDKZkTeckoHelper templib)
|
||||
public int SaveHuellas(string iPLocal, string puerto, int CvePersonal, SDKZkTeckoHelper templib,int cveChecador)
|
||||
{
|
||||
int enrollnumber = 0;
|
||||
int userenroll = 0;
|
||||
@@ -689,13 +680,20 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
if (conected)
|
||||
{
|
||||
var usuarios = libx.GetUserInfo();
|
||||
|
||||
WCF_Checador.PersonalChecadorIDResponse[] personalchecador = Servicecon.PersonalChecadorID(cveChecador, CvePersonal);
|
||||
|
||||
var personalsig = personalchecador.ToList().FirstOrDefault(x => x.CvePersonal == CvePersonal);
|
||||
if (personalsig != null) {
|
||||
enrollnumber = personalsig.ChecadorID.ToEntero();
|
||||
}
|
||||
foreach (var item in usuarios)
|
||||
{
|
||||
userenroll = (item.dwEnrollNumber.ToEntero() > userenroll && item.dwEnrollNumber != tempPersonal ? item.dwEnrollNumber.ToEntero() : userenroll);
|
||||
if (item.Password.ToEntero() == CvePersonal)
|
||||
{
|
||||
enrollnumber = item.dwEnrollNumber.ToEntero();
|
||||
}
|
||||
//if (item.Password.ToEntero() == CvePersonal)
|
||||
//{
|
||||
// enrollnumber = item.dwEnrollNumber.ToEntero();
|
||||
//}
|
||||
}
|
||||
enrollnumber = enrollnumber > 0 ? enrollnumber : (userenroll += 1);
|
||||
if (libx.sta_SetUserInfo(enrollnumber.ToString(), empleado.NombreCompleto, 0, "", CvePersonal.ToString()) > 0)
|
||||
@@ -714,17 +712,23 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
{
|
||||
|
||||
int cvePersonal = getcurrentcvePersonal();
|
||||
WCF_Checador.PersonalChecadorIDResponse[] personalchecador = Servicecon.PersonalChecadorID(-1, cvePersonal);
|
||||
foreach (DataGridViewRow row in DGVChecadores.Rows)
|
||||
{
|
||||
DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)(row.Cells[0]);
|
||||
DataGridViewCheckBoxCell chkv = (DataGridViewCheckBoxCell)(row.Cells[4]);
|
||||
|
||||
chkv.Value = false;
|
||||
int cveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero();
|
||||
if (empleadoschecador.FindAll(x => x.CvePersonal == cvePersonal && x.CveChecador == cveChecador).Count > 0)
|
||||
chk.Value = false;
|
||||
|
||||
|
||||
int cveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero();
|
||||
if (personalchecador.ToList().FindAll(x => x.CvePersonal == cvePersonal && x.CveChecador == cveChecador).Count > 0)
|
||||
{
|
||||
chkv.Value = true;
|
||||
chk.Value = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
List<ResponseUser> usuariosporvaldar;
|
||||
@@ -767,7 +771,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
this.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
TxtNombreRegistro.Text = "";
|
||||
TxtNombrevinculo.Text = "";
|
||||
TxtIDChecador.Text = "";
|
||||
});
|
||||
var usuarios = usuariosporvaldar;
|
||||
foreach (var item in usuarios)
|
||||
@@ -779,7 +783,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
this.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
TxtNombreRegistro.Text = item.Name;
|
||||
TxtNombrevinculo.Text = empleados.Find(x => x.CvePersonal == item.Password.ToEntero()).CodigoNombreCompleto;
|
||||
TxtIDChecador.Text = empleados.Find(x => x.CvePersonal == item.Password.ToEntero()).CodigoNombreCompleto;
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -1020,15 +1024,16 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
|
||||
string iPLocal = row.Cells["iPLocal"].Value.ToString();
|
||||
string puerto = row.Cells["puerto"].Value.ToString();
|
||||
int CveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero();
|
||||
SDKZkTeckoHelper templib = null;
|
||||
if (lib.iP_Port == string.Format("{0}_{1}", iPLocal, puerto))
|
||||
{
|
||||
templib = lib;
|
||||
}
|
||||
int enrollnumber = SaveHuellas(iPLocal, puerto, CvePersonal, templib);
|
||||
int enrollnumber = SaveHuellas(iPLocal, puerto, CvePersonal, templib, CveChecador);
|
||||
msg = $"{msg}con el código de empleado{enrollnumber}";
|
||||
if (enrollnumber > 0) { enrollnumberb = enrollnumber; chkv.Value = true; }
|
||||
checkadores.Add(new UtileriasServiceWCF.PersonalChecadorUPsqliteModel() { id = enrollnumber, CveChecador = row.Cells["CveChecador"].Value.ToString().ToEntero() });
|
||||
checkadores.Add(new UtileriasServiceWCF.PersonalChecadorUPsqliteModel() { id = enrollnumber, CveChecador = CveChecador });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1338,15 +1343,39 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
{
|
||||
|
||||
int cveChecadorddl = Ddlchecador.SelectedValue.ToString().ToEntero();
|
||||
var personalchecador = Servicecon.PersonalChecadorID(cveChecadorddl);
|
||||
WCF_Checador.PersonalChecadorIDResponse[] personalchecador = Servicecon.PersonalChecadorID(cveChecadorddl);
|
||||
string iPLocal = ((UtileriasServiceWCF.ResponseGetChecadoresModel)Ddlchecador.SelectedItem).iPLocal;
|
||||
string puerto = ((UtileriasServiceWCF.ResponseGetChecadoresModel)Ddlchecador.SelectedItem).puerto;
|
||||
|
||||
var checador = getusuarioschecador(iPLocal, puerto);
|
||||
List<ResponseUser> checador = getusuarioschecador(iPLocal, puerto);
|
||||
// Inicializar valores por default
|
||||
foreach (var usuario in checador)
|
||||
{
|
||||
usuario.CveChecador = cveChecadorddl;
|
||||
usuario.CvePersonal = "0";
|
||||
usuario.NombrePersonal = string.Empty;
|
||||
}
|
||||
// Left join por ChecadorID / dwEnrollNumber
|
||||
var personalPorChecadorId = personalchecador
|
||||
.Where(x => x.CveChecador == cveChecadorddl)
|
||||
.GroupBy(x => x.ChecadorID)
|
||||
.ToDictionary(x => x.Key, x => x.First());
|
||||
|
||||
foreach (var usuario in checador)
|
||||
{
|
||||
if (personalPorChecadorId.TryGetValue(usuario.dwEnrollNumber, out var personal))
|
||||
{
|
||||
usuario.CvePersonal = personal.CvePersonal.ToString();
|
||||
usuario.NombrePersonal = personal.NombreCompleto;
|
||||
}
|
||||
}
|
||||
DGVPersonalChecador.AutoGenerateColumns = false;
|
||||
DGVPersonalChecador.DataSource = checador;
|
||||
DGVPersonalChecador.Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
Ddlchecador_SelectedIndexChangedentre =true;
|
||||
Ddlchecador_SelectedIndexChangedentre = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1367,7 +1396,7 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
if (!conected)
|
||||
{
|
||||
int conexion = lib.sta_ConnectTCP(iPLocal, puerto, "0");
|
||||
conected = conexion > 0;
|
||||
conected = conexion > 0;
|
||||
}
|
||||
|
||||
//if (!conected)
|
||||
@@ -1380,10 +1409,65 @@ namespace ADSUtileriasWF.Views.RelojChecador.Views
|
||||
return usuarios;
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
|
||||
private void tabRegistro_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DGVPersonalChecador_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (e.RowIndex < 0)
|
||||
return;
|
||||
|
||||
PnlVinvular.Visible = true;
|
||||
|
||||
currentUsuario = DGVPersonalChecador.Rows[e.RowIndex].DataBoundItem as ResponseUser;
|
||||
|
||||
if (currentUsuario == null)
|
||||
return;
|
||||
TxtNombreRegistro.Enabled = false;
|
||||
TxtIDChecador.Enabled = false;
|
||||
|
||||
TxtNombreRegistro.Text = currentUsuario.Name;
|
||||
TxtIDChecador.Text = currentUsuario.dwEnrollNumber;
|
||||
|
||||
if (!string.IsNullOrEmpty(currentUsuario.CvePersonal) && currentUsuario.CvePersonal != "0")
|
||||
{
|
||||
DdlEmpleadosVinculo.SelectedValue = Convert.ToInt32(currentUsuario.CvePersonal);
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlEmpleadosVinculo.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void BtnVincularChecadorSig_Click(object sender, EventArgs e)
|
||||
{
|
||||
int CvePersonal = DdlEmpleadosVinculo.SelectedValue.ToString().ToEntero();
|
||||
if(CvePersonal > 0)
|
||||
{
|
||||
Servicecon.AddUpPersonalChecadorVinculo(new WCF_Checador.RequestPersonalChecadorVinculoAddUp()
|
||||
{
|
||||
ChecadorID = TxtIDChecador.Text.ToString(),
|
||||
CvePersonal = CvePersonal,
|
||||
CveChecador = currentUsuario.CveChecador,
|
||||
Checadorname = TxtNombreRegistro.Text
|
||||
});
|
||||
|
||||
PnlVinvular.Visible = false;
|
||||
TxtNombreRegistro.Text = "";
|
||||
TxtIDChecador.Text = "";
|
||||
DdlEmpleadosVinculo.SelectedIndex = -1;
|
||||
currentUsuario = null;
|
||||
ModExtensiones.Alert($"Empleado vinculado correctamente", "Advertencia", MessageBoxButtons.OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
ModExtensiones.Alert($"Seleccione un empleado para vincular", "Advertencia", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -117,18 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="iPLocal.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="puerto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="iPLocal.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="puerto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@@ -144,4 +132,10 @@
|
||||
<metadata name="CodigoNombreCompleto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="iPLocal.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="puerto.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -33,8 +33,8 @@
|
||||
"net8.0-windows7.0": {
|
||||
"targetAlias": "net8.0-windows",
|
||||
"projectReferences": {
|
||||
"c:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj": {
|
||||
"projectPath": "c:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj"
|
||||
"C:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj": {
|
||||
"projectPath": "C:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\caudi\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.3</NuGetToolVersion>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\caudi\.nuget\packages\" />
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("ADSUtileriasWF")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+83acc6b4f1f39d91daedc7a2178608003dd7091a")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ded676ec67dc7be6dbc8c881fb9e40b8f3842840")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("ADSUtileriasWF")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ADSUtileriasWF")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
f3853da765c80032040fb81096227f321e96bff17dd93301f125745b9d8f0a33
|
||||
a3b11f0996318f936cb03dab30dde336e8a3368b5c42fe8078740d96b15497e1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3955,8 +3955,8 @@
|
||||
"net8.0-windows7.0": {
|
||||
"targetAlias": "net8.0-windows",
|
||||
"projectReferences": {
|
||||
"c:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj": {
|
||||
"projectPath": "c:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj"
|
||||
"C:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj": {
|
||||
"projectPath": "C:\\Proyectos\\SIG_NETCore\\SIGAPI\\ADSNetLibrary\\ADSNetLibrary\\ADSNetLibrary.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "JsQKpISEFdI=",
|
||||
"dgSpecHash": "JoOvuxoOgDE=",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Proyectos\\Checador.git\\Checador-Desktop\\ADSUtileriasWF\\ADSUtileriasWF.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
Reference in New Issue
Block a user