Version OScar
This commit is contained in:
117
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/FormBase.cs
Normal file
117
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/FormBase.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
using FontAwesome.Sharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views
|
||||
{
|
||||
public class FormBase : Form
|
||||
{
|
||||
public void GuardaLog(string mensaje)
|
||||
{
|
||||
ADSNetLibrary.Helpers.ModExtensiones.GuardaLog(mensaje);
|
||||
}
|
||||
public static System.Windows.Forms.DialogResult Alert(string mensage, string Titulo, System.Windows.Forms.MessageBoxButtons botones = System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon Icon = System.Windows.Forms.MessageBoxIcon.None)
|
||||
{
|
||||
System.Windows.Forms.DialogResult result = System.Windows.Forms.DialogResult.None;
|
||||
result = System.Windows.Forms.MessageBox.Show(mensage, Titulo, botones, Icon);
|
||||
//switch (button)
|
||||
//{
|
||||
// case MessageBoxButtons.YesNo:
|
||||
// using (frmYesNo yesNo = new frmYesNo())
|
||||
// {
|
||||
// yesNo.Text = caption;
|
||||
// yesNo.Message = message;
|
||||
// result = yesNo.ShowDialog();
|
||||
// }
|
||||
// break;
|
||||
// case MessageBoxButtons.OK:
|
||||
// using (frmOK ok = new frmOK())
|
||||
// {
|
||||
// ok.Text = caption;
|
||||
// ok.Message = message;
|
||||
// result = ok.ShowDialog();
|
||||
// }
|
||||
// break;
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
|
||||
//UtileriasServiceWCF.ResponseLogin UserV2
|
||||
//public WCF_PV.Usuario UsuarioActual { get { return ModVarsPV.UsuarioActual; } set { ModVarsPV.UsuarioActual = value; } }
|
||||
#region "F U N C I O N E S D E W I N D O W S"
|
||||
#region "mover /arrastrar formulario"
|
||||
|
||||
private const int WM_NCLBUTTONDOWN = 0xA1;
|
||||
private const int HT_CAPTION = 0x2;
|
||||
[DllImportAttribute("user32.dll")]
|
||||
private static extern int SendMessage(IntPtr hWnd,
|
||||
int Msg, int wParam, int lParam);
|
||||
[DllImportAttribute("user32.dll")]
|
||||
private static extern bool ReleaseCapture();
|
||||
|
||||
#endregion
|
||||
#region colorbar
|
||||
//[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
//public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
|
||||
|
||||
//[DllImport("User32.dll")]
|
||||
//private static extern IntPtr GetWindowDC(IntPtr hWnd);
|
||||
|
||||
//protected override void WndProc(ref Message m)
|
||||
//{
|
||||
// base.WndProc(ref m);
|
||||
// const int WM_NCPAINT = 0x85;
|
||||
// if (m.Msg == WM_NCPAINT)
|
||||
// {
|
||||
// IntPtr hdc = GetWindowDC(m.HWnd);
|
||||
// if ((int)hdc != 0)
|
||||
// {
|
||||
// Graphics g = Graphics.FromHdc(hdc);
|
||||
// g.FillRectangle(Brushes.Green, new Rectangle(0, 0, 4800, 23));
|
||||
// g.Flush();
|
||||
// ReleaseDC(m.HWnd, hdc);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
public void ArrastrarForm_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
|
||||
}
|
||||
|
||||
}
|
||||
public void BtnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
|
||||
public void BtnMaximizeRestore_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (WindowState == FormWindowState.Maximized)
|
||||
{
|
||||
WindowState = FormWindowState.Normal;
|
||||
((IconButton)sender).IconChar = FontAwesome.Sharp.IconChar.WindowMaximize;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowState = FormWindowState.Maximized;
|
||||
((IconButton)sender).IconChar = FontAwesome.Sharp.IconChar.WindowRestore;
|
||||
|
||||
}
|
||||
}
|
||||
public void BtnMinimize_Click(object sender, EventArgs e)
|
||||
{
|
||||
WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
287
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmChecadores.Designer.cs
generated
Normal file
287
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmChecadores.Designer.cs
generated
Normal file
@@ -0,0 +1,287 @@
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
partial class FrmChecadores
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmChecadores));
|
||||
this.PnlGridchecadores = new System.Windows.Forms.Panel();
|
||||
this.DGVchecadores = new System.Windows.Forms.DataGridView();
|
||||
this.Movimiento = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Nombre = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.IPCHECADOR = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.PUERTO = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.GrpNewChecadores = new System.Windows.Forms.GroupBox();
|
||||
this.TxtPuerto = new System.Windows.Forms.TextBox();
|
||||
this.TxtIP = new System.Windows.Forms.TextBox();
|
||||
this.LblNombre = new System.Windows.Forms.Label();
|
||||
this.LblPuerto = new System.Windows.Forms.Label();
|
||||
this.LblIP = new System.Windows.Forms.Label();
|
||||
this.TxtNombre = new System.Windows.Forms.TextBox();
|
||||
this.BtnActualizar = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnAgragar = new FontAwesome.Sharp.IconButton();
|
||||
this.PnlGridchecadores.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DGVchecadores)).BeginInit();
|
||||
this.GrpNewChecadores.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PnlGridchecadores
|
||||
//
|
||||
this.PnlGridchecadores.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PnlGridchecadores.Controls.Add(this.DGVchecadores);
|
||||
this.PnlGridchecadores.Location = new System.Drawing.Point(10, 123);
|
||||
this.PnlGridchecadores.Name = "PnlGridchecadores";
|
||||
this.PnlGridchecadores.Size = new System.Drawing.Size(548, 207);
|
||||
this.PnlGridchecadores.TabIndex = 7;
|
||||
//
|
||||
// DGVchecadores
|
||||
//
|
||||
this.DGVchecadores.AllowUserToAddRows = false;
|
||||
this.DGVchecadores.AllowUserToDeleteRows = false;
|
||||
this.DGVchecadores.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.DGVchecadores.BackgroundColor = System.Drawing.SystemColors.GradientInactiveCaption;
|
||||
this.DGVchecadores.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.DGVchecadores.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.Movimiento,
|
||||
this.Nombre,
|
||||
this.IPCHECADOR,
|
||||
this.PUERTO});
|
||||
this.DGVchecadores.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.DGVchecadores.Location = new System.Drawing.Point(0, 0);
|
||||
this.DGVchecadores.Name = "DGVchecadores";
|
||||
this.DGVchecadores.ReadOnly = true;
|
||||
this.DGVchecadores.RowHeadersVisible = false;
|
||||
this.DGVchecadores.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.DGVchecadores.Size = new System.Drawing.Size(548, 207);
|
||||
this.DGVchecadores.TabIndex = 1;
|
||||
//
|
||||
// Movimiento
|
||||
//
|
||||
this.Movimiento.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
||||
this.Movimiento.DataPropertyName = "IDCHECADOR";
|
||||
this.Movimiento.FillWeight = 177.6649F;
|
||||
this.Movimiento.HeaderText = "#";
|
||||
this.Movimiento.Name = "Movimiento";
|
||||
this.Movimiento.ReadOnly = true;
|
||||
this.Movimiento.Visible = false;
|
||||
this.Movimiento.Width = 40;
|
||||
//
|
||||
// Nombre
|
||||
//
|
||||
this.Nombre.DataPropertyName = "NOMBRE";
|
||||
this.Nombre.FillWeight = 90.35698F;
|
||||
this.Nombre.HeaderText = "Nombre";
|
||||
this.Nombre.Name = "Nombre";
|
||||
this.Nombre.ReadOnly = true;
|
||||
//
|
||||
// IPCHECADOR
|
||||
//
|
||||
this.IPCHECADOR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
||||
this.IPCHECADOR.DataPropertyName = "IPCHECADOR";
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
dataGridViewCellStyle1.Format = "C";
|
||||
this.IPCHECADOR.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.IPCHECADOR.FillWeight = 90.35698F;
|
||||
this.IPCHECADOR.HeaderText = "IP";
|
||||
this.IPCHECADOR.Name = "IPCHECADOR";
|
||||
this.IPCHECADOR.ReadOnly = true;
|
||||
this.IPCHECADOR.Width = 150;
|
||||
//
|
||||
// PUERTO
|
||||
//
|
||||
this.PUERTO.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
||||
this.PUERTO.DataPropertyName = "PUERTO";
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
|
||||
dataGridViewCellStyle2.Format = "C";
|
||||
this.PUERTO.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.PUERTO.FillWeight = 90.35698F;
|
||||
this.PUERTO.HeaderText = "Puerto";
|
||||
this.PUERTO.Name = "PUERTO";
|
||||
this.PUERTO.ReadOnly = true;
|
||||
this.PUERTO.Width = 90;
|
||||
//
|
||||
// GrpNewChecadores
|
||||
//
|
||||
this.GrpNewChecadores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.GrpNewChecadores.Controls.Add(this.TxtPuerto);
|
||||
this.GrpNewChecadores.Controls.Add(this.TxtIP);
|
||||
this.GrpNewChecadores.Controls.Add(this.LblNombre);
|
||||
this.GrpNewChecadores.Controls.Add(this.LblPuerto);
|
||||
this.GrpNewChecadores.Controls.Add(this.LblIP);
|
||||
this.GrpNewChecadores.Controls.Add(this.TxtNombre);
|
||||
this.GrpNewChecadores.Controls.Add(this.BtnActualizar);
|
||||
this.GrpNewChecadores.Controls.Add(this.BtnAgragar);
|
||||
this.GrpNewChecadores.Location = new System.Drawing.Point(10, 10);
|
||||
this.GrpNewChecadores.Name = "GrpNewChecadores";
|
||||
this.GrpNewChecadores.Size = new System.Drawing.Size(548, 107);
|
||||
this.GrpNewChecadores.TabIndex = 6;
|
||||
this.GrpNewChecadores.TabStop = false;
|
||||
this.GrpNewChecadores.Text = "Nuevo";
|
||||
//
|
||||
// TxtPuerto
|
||||
//
|
||||
this.TxtPuerto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtPuerto.Location = new System.Drawing.Point(436, 35);
|
||||
this.TxtPuerto.Name = "TxtPuerto";
|
||||
this.TxtPuerto.Size = new System.Drawing.Size(86, 20);
|
||||
this.TxtPuerto.TabIndex = 12;
|
||||
this.TxtPuerto.Text = "4370";
|
||||
//
|
||||
// TxtIP
|
||||
//
|
||||
this.TxtIP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtIP.Location = new System.Drawing.Point(248, 35);
|
||||
this.TxtIP.Name = "TxtIP";
|
||||
this.TxtIP.Size = new System.Drawing.Size(174, 20);
|
||||
this.TxtIP.TabIndex = 11;
|
||||
this.TxtIP.Text = "192.168.100.62";
|
||||
//
|
||||
// LblNombre
|
||||
//
|
||||
this.LblNombre.AutoSize = true;
|
||||
this.LblNombre.Location = new System.Drawing.Point(5, 16);
|
||||
this.LblNombre.Name = "LblNombre";
|
||||
this.LblNombre.Size = new System.Drawing.Size(44, 13);
|
||||
this.LblNombre.TabIndex = 10;
|
||||
this.LblNombre.Text = "Nombre";
|
||||
//
|
||||
// LblPuerto
|
||||
//
|
||||
this.LblPuerto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LblPuerto.AutoSize = true;
|
||||
this.LblPuerto.Location = new System.Drawing.Point(436, 16);
|
||||
this.LblPuerto.Name = "LblPuerto";
|
||||
this.LblPuerto.Size = new System.Drawing.Size(38, 13);
|
||||
this.LblPuerto.TabIndex = 9;
|
||||
this.LblPuerto.Text = "Puerto";
|
||||
//
|
||||
// LblIP
|
||||
//
|
||||
this.LblIP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LblIP.AutoSize = true;
|
||||
this.LblIP.Location = new System.Drawing.Point(248, 16);
|
||||
this.LblIP.Name = "LblIP";
|
||||
this.LblIP.Size = new System.Drawing.Size(17, 13);
|
||||
this.LblIP.TabIndex = 8;
|
||||
this.LblIP.Text = "IP";
|
||||
//
|
||||
// TxtNombre
|
||||
//
|
||||
this.TxtNombre.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtNombre.Location = new System.Drawing.Point(5, 35);
|
||||
this.TxtNombre.Name = "TxtNombre";
|
||||
this.TxtNombre.Size = new System.Drawing.Size(226, 20);
|
||||
this.TxtNombre.TabIndex = 7;
|
||||
//
|
||||
// BtnActualizar
|
||||
//
|
||||
this.BtnActualizar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnActualizar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.BtnActualizar.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnActualizar.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.BtnActualizar.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnActualizar.IconChar = FontAwesome.Sharp.IconChar.Retweet;
|
||||
this.BtnActualizar.IconColor = System.Drawing.Color.White;
|
||||
this.BtnActualizar.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnActualizar.IconSize = 32;
|
||||
this.BtnActualizar.Location = new System.Drawing.Point(407, 60);
|
||||
this.BtnActualizar.Name = "BtnActualizar";
|
||||
this.BtnActualizar.Rotation = 0D;
|
||||
this.BtnActualizar.Size = new System.Drawing.Size(116, 43);
|
||||
this.BtnActualizar.TabIndex = 6;
|
||||
this.BtnActualizar.Text = "Actualizar";
|
||||
this.BtnActualizar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnActualizar.UseVisualStyleBackColor = false;
|
||||
this.BtnActualizar.Click += new System.EventHandler(this.BtnActualizar_Click);
|
||||
//
|
||||
// BtnAgragar
|
||||
//
|
||||
this.BtnAgragar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnAgragar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.BtnAgragar.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnAgragar.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.BtnAgragar.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnAgragar.IconChar = FontAwesome.Sharp.IconChar.Plus;
|
||||
this.BtnAgragar.IconColor = System.Drawing.Color.White;
|
||||
this.BtnAgragar.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnAgragar.IconSize = 32;
|
||||
this.BtnAgragar.Location = new System.Drawing.Point(300, 60);
|
||||
this.BtnAgragar.Name = "BtnAgragar";
|
||||
this.BtnAgragar.Rotation = 0D;
|
||||
this.BtnAgragar.Size = new System.Drawing.Size(101, 43);
|
||||
this.BtnAgragar.TabIndex = 5;
|
||||
this.BtnAgragar.Text = "Agregar";
|
||||
this.BtnAgragar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnAgragar.UseVisualStyleBackColor = false;
|
||||
this.BtnAgragar.Click += new System.EventHandler(this.BtnAgragar_Click);
|
||||
//
|
||||
// FrmChecadores
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(563, 337);
|
||||
this.Controls.Add(this.PnlGridchecadores);
|
||||
this.Controls.Add(this.GrpNewChecadores);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FrmChecadores";
|
||||
this.Text = "Checadores";
|
||||
this.Load += new System.EventHandler(this.Checadores_Load);
|
||||
this.PnlGridchecadores.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.DGVchecadores)).EndInit();
|
||||
this.GrpNewChecadores.ResumeLayout(false);
|
||||
this.GrpNewChecadores.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private FontAwesome.Sharp.IconButton BtnAgragar;
|
||||
private System.Windows.Forms.GroupBox GrpNewChecadores;
|
||||
private FontAwesome.Sharp.IconButton BtnActualizar;
|
||||
private System.Windows.Forms.TextBox TxtPuerto;
|
||||
private System.Windows.Forms.Label LblNombre;
|
||||
private System.Windows.Forms.Label LblPuerto;
|
||||
private System.Windows.Forms.Label LblIP;
|
||||
private System.Windows.Forms.TextBox TxtNombre;
|
||||
private System.Windows.Forms.TextBox TxtIP;
|
||||
private System.Windows.Forms.Panel PnlGridchecadores;
|
||||
private System.Windows.Forms.DataGridView DGVchecadores;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Movimiento;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Nombre;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn IPCHECADOR;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn PUERTO;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using ADSUtileriasNetFrame.Conexiones.Local.Gluyas;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
public partial class FrmChecadores : FormBase
|
||||
{
|
||||
private void Checadores_Load(object sender, EventArgs e)
|
||||
{
|
||||
loadchecadores();
|
||||
}
|
||||
public FrmChecadores()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public void loadchecadores()
|
||||
{
|
||||
|
||||
DataTable dtChecadores = new DataTable();
|
||||
ClsBD chk = new ClsBD();
|
||||
string sqlEjecuta = "SELECT * FROM CHECADORES;";
|
||||
dtChecadores = chk.EjecutaSqlDT(sqlEjecuta);
|
||||
|
||||
|
||||
DGVchecadores.DataSource = dtChecadores;
|
||||
DGVchecadores.Refresh();
|
||||
|
||||
}
|
||||
private void BtnAgragar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
ClsBD chk = new ClsBD();
|
||||
string sChechador = TxtNombre.Text;
|
||||
string sIP = TxtIP.Text;
|
||||
string sPuerto = TxtPuerto.Text;
|
||||
string sqlEjecuta = "INSERT INTO CHECADORES (NOMBRE,IPCHECADOR,PUERTO) VALUES('" + sChechador + "','" + sIP + "','" + sPuerto + "');";
|
||||
chk.EjecutaSQL(sqlEjecuta);
|
||||
TxtNombre.Text = "";
|
||||
TxtIP.Text = "";
|
||||
TxtPuerto.Text = "";
|
||||
chk.Desconectar();
|
||||
loadchecadores();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
ADSNetLibrary.Helpers.ModExtensiones.GuardaLog($"Error al aEjecutaSqlDT.{ex}");
|
||||
Alert("Error al guardar el checador. ", "Información", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnActualizar_Click(object sender, EventArgs e)
|
||||
{
|
||||
loadchecadores();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
572
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmInicio.Designer.cs
generated
Normal file
572
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmInicio.Designer.cs
generated
Normal file
@@ -0,0 +1,572 @@
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
partial class FrmInicio
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmInicio));
|
||||
this.PnlMenu = new System.Windows.Forms.Panel();
|
||||
this.byadsistemas = new System.Windows.Forms.Label();
|
||||
this.BtnConfiguracion = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnReporte = new FontAwesome.Sharp.IconButton();
|
||||
this.ChecadoresGluyas = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnNomina = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnAsistencia = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnPersonal = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnChecador = new FontAwesome.Sharp.IconButton();
|
||||
this.PnlLogo = new System.Windows.Forms.Panel();
|
||||
this.PnlTitle = new System.Windows.Forms.Panel();
|
||||
this.PnlmenuXD = new System.Windows.Forms.Panel();
|
||||
this.btnmenuXD = new FontAwesome.Sharp.IconButton();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.PnlTitulo = new System.Windows.Forms.Panel();
|
||||
this.LblSubProyecto = new System.Windows.Forms.Label();
|
||||
this.BtnMinimize = new FontAwesome.Sharp.IconButton();
|
||||
this.LblEmpresa = new System.Windows.Forms.Label();
|
||||
this.BtnMaximizeRestore = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnClose = new FontAwesome.Sharp.IconButton();
|
||||
this.PnlBody = new System.Windows.Forms.Panel();
|
||||
this.PnlBodyForms = new System.Windows.Forms.Panel();
|
||||
this.PnlTopMenu = new System.Windows.Forms.Panel();
|
||||
this.LblUsuario = new System.Windows.Forms.Label();
|
||||
this.IboxUsuario = new FontAwesome.Sharp.IconPictureBox();
|
||||
this.iconButton2 = new FontAwesome.Sharp.IconButton();
|
||||
this.PnlMenu.SuspendLayout();
|
||||
this.PnlLogo.SuspendLayout();
|
||||
this.PnlTitle.SuspendLayout();
|
||||
this.PnlmenuXD.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.PnlTitulo.SuspendLayout();
|
||||
this.PnlBody.SuspendLayout();
|
||||
this.PnlTopMenu.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.IboxUsuario)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PnlMenu
|
||||
//
|
||||
this.PnlMenu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.PnlMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(65)))), ((int)(((byte)(80)))));
|
||||
this.PnlMenu.Controls.Add(this.byadsistemas);
|
||||
this.PnlMenu.Controls.Add(this.BtnConfiguracion);
|
||||
this.PnlMenu.Controls.Add(this.BtnReporte);
|
||||
this.PnlMenu.Controls.Add(this.ChecadoresGluyas);
|
||||
this.PnlMenu.Controls.Add(this.BtnNomina);
|
||||
this.PnlMenu.Controls.Add(this.BtnAsistencia);
|
||||
this.PnlMenu.Controls.Add(this.BtnPersonal);
|
||||
this.PnlMenu.Controls.Add(this.BtnChecador);
|
||||
this.PnlMenu.Controls.Add(this.PnlLogo);
|
||||
this.PnlMenu.Location = new System.Drawing.Point(0, 0);
|
||||
this.PnlMenu.Name = "PnlMenu";
|
||||
this.PnlMenu.Size = new System.Drawing.Size(189, 506);
|
||||
this.PnlMenu.TabIndex = 0;
|
||||
//
|
||||
// byadsistemas
|
||||
//
|
||||
this.byadsistemas.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.byadsistemas.AutoSize = true;
|
||||
this.byadsistemas.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.byadsistemas.Location = new System.Drawing.Point(56, 485);
|
||||
this.byadsistemas.Name = "byadsistemas";
|
||||
this.byadsistemas.Size = new System.Drawing.Size(90, 13);
|
||||
this.byadsistemas.TabIndex = 1;
|
||||
this.byadsistemas.Text = "by ADSISTEMAS";
|
||||
//
|
||||
// BtnConfiguracion
|
||||
//
|
||||
this.BtnConfiguracion.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.BtnConfiguracion.FlatAppearance.BorderSize = 0;
|
||||
this.BtnConfiguracion.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnConfiguracion.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnConfiguracion.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.BtnConfiguracion.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnConfiguracion.IconChar = FontAwesome.Sharp.IconChar.Tools;
|
||||
this.BtnConfiguracion.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnConfiguracion.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnConfiguracion.IconSize = 28;
|
||||
this.BtnConfiguracion.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnConfiguracion.Location = new System.Drawing.Point(0, 235);
|
||||
this.BtnConfiguracion.Name = "BtnConfiguracion";
|
||||
this.BtnConfiguracion.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.BtnConfiguracion.Rotation = 0D;
|
||||
this.BtnConfiguracion.Size = new System.Drawing.Size(189, 35);
|
||||
this.BtnConfiguracion.TabIndex = 0;
|
||||
this.BtnConfiguracion.Text = "Configuración";
|
||||
this.BtnConfiguracion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnConfiguracion.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnConfiguracion.UseVisualStyleBackColor = true;
|
||||
this.BtnConfiguracion.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// BtnReporte
|
||||
//
|
||||
this.BtnReporte.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.BtnReporte.FlatAppearance.BorderSize = 0;
|
||||
this.BtnReporte.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnReporte.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnReporte.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.BtnReporte.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnReporte.IconChar = FontAwesome.Sharp.IconChar.FilePdf;
|
||||
this.BtnReporte.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnReporte.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnReporte.IconSize = 28;
|
||||
this.BtnReporte.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnReporte.Location = new System.Drawing.Point(0, 200);
|
||||
this.BtnReporte.Name = "BtnReporte";
|
||||
this.BtnReporte.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.BtnReporte.Rotation = 0D;
|
||||
this.BtnReporte.Size = new System.Drawing.Size(189, 35);
|
||||
this.BtnReporte.TabIndex = 3;
|
||||
this.BtnReporte.Text = "Reportes";
|
||||
this.BtnReporte.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnReporte.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnReporte.UseVisualStyleBackColor = true;
|
||||
this.BtnReporte.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// ChecadoresGluyas
|
||||
//
|
||||
this.ChecadoresGluyas.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.ChecadoresGluyas.FlatAppearance.BorderSize = 0;
|
||||
this.ChecadoresGluyas.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.ChecadoresGluyas.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.ChecadoresGluyas.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.ChecadoresGluyas.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.ChecadoresGluyas.IconChar = FontAwesome.Sharp.IconChar.Algolia;
|
||||
this.ChecadoresGluyas.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.ChecadoresGluyas.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.ChecadoresGluyas.IconSize = 28;
|
||||
this.ChecadoresGluyas.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.ChecadoresGluyas.Location = new System.Drawing.Point(0, 165);
|
||||
this.ChecadoresGluyas.Name = "ChecadoresGluyas";
|
||||
this.ChecadoresGluyas.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.ChecadoresGluyas.Rotation = 0D;
|
||||
this.ChecadoresGluyas.Size = new System.Drawing.Size(189, 35);
|
||||
this.ChecadoresGluyas.TabIndex = 2;
|
||||
this.ChecadoresGluyas.Text = "Checadores";
|
||||
this.ChecadoresGluyas.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.ChecadoresGluyas.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.ChecadoresGluyas.UseVisualStyleBackColor = true;
|
||||
this.ChecadoresGluyas.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// BtnNomina
|
||||
//
|
||||
this.BtnNomina.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.BtnNomina.FlatAppearance.BorderSize = 0;
|
||||
this.BtnNomina.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnNomina.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnNomina.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.BtnNomina.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnNomina.IconChar = FontAwesome.Sharp.IconChar.Bell;
|
||||
this.BtnNomina.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnNomina.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnNomina.IconSize = 28;
|
||||
this.BtnNomina.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnNomina.Location = new System.Drawing.Point(0, 130);
|
||||
this.BtnNomina.Name = "BtnNomina";
|
||||
this.BtnNomina.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.BtnNomina.Rotation = 0D;
|
||||
this.BtnNomina.Size = new System.Drawing.Size(189, 35);
|
||||
this.BtnNomina.TabIndex = 0;
|
||||
this.BtnNomina.Text = "Nomina";
|
||||
this.BtnNomina.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnNomina.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnNomina.UseVisualStyleBackColor = true;
|
||||
this.BtnNomina.Visible = false;
|
||||
this.BtnNomina.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// BtnAsistencia
|
||||
//
|
||||
this.BtnAsistencia.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.BtnAsistencia.FlatAppearance.BorderSize = 0;
|
||||
this.BtnAsistencia.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnAsistencia.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnAsistencia.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.BtnAsistencia.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnAsistencia.IconChar = FontAwesome.Sharp.IconChar.Check;
|
||||
this.BtnAsistencia.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnAsistencia.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnAsistencia.IconSize = 28;
|
||||
this.BtnAsistencia.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnAsistencia.Location = new System.Drawing.Point(0, 95);
|
||||
this.BtnAsistencia.Name = "BtnAsistencia";
|
||||
this.BtnAsistencia.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.BtnAsistencia.Rotation = 0D;
|
||||
this.BtnAsistencia.Size = new System.Drawing.Size(189, 35);
|
||||
this.BtnAsistencia.TabIndex = 0;
|
||||
this.BtnAsistencia.Text = "Asistencia";
|
||||
this.BtnAsistencia.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnAsistencia.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnAsistencia.UseVisualStyleBackColor = true;
|
||||
this.BtnAsistencia.Visible = false;
|
||||
this.BtnAsistencia.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// BtnPersonal
|
||||
//
|
||||
this.BtnPersonal.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.BtnPersonal.FlatAppearance.BorderSize = 0;
|
||||
this.BtnPersonal.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnPersonal.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnPersonal.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.BtnPersonal.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnPersonal.IconChar = FontAwesome.Sharp.IconChar.IdCard;
|
||||
this.BtnPersonal.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnPersonal.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnPersonal.IconSize = 28;
|
||||
this.BtnPersonal.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnPersonal.Location = new System.Drawing.Point(0, 60);
|
||||
this.BtnPersonal.Name = "BtnPersonal";
|
||||
this.BtnPersonal.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.BtnPersonal.Rotation = 0D;
|
||||
this.BtnPersonal.Size = new System.Drawing.Size(189, 35);
|
||||
this.BtnPersonal.TabIndex = 0;
|
||||
this.BtnPersonal.Text = "Personal";
|
||||
this.BtnPersonal.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnPersonal.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnPersonal.UseVisualStyleBackColor = true;
|
||||
this.BtnPersonal.Visible = false;
|
||||
this.BtnPersonal.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// BtnChecador
|
||||
//
|
||||
this.BtnChecador.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.BtnChecador.FlatAppearance.BorderSize = 0;
|
||||
this.BtnChecador.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnChecador.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnChecador.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
|
||||
this.BtnChecador.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnChecador.IconChar = FontAwesome.Sharp.IconChar.Algolia;
|
||||
this.BtnChecador.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnChecador.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnChecador.IconSize = 28;
|
||||
this.BtnChecador.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnChecador.Location = new System.Drawing.Point(0, 25);
|
||||
this.BtnChecador.Name = "BtnChecador";
|
||||
this.BtnChecador.Padding = new System.Windows.Forms.Padding(9, 0, 9, 0);
|
||||
this.BtnChecador.Rotation = 0D;
|
||||
this.BtnChecador.Size = new System.Drawing.Size(189, 35);
|
||||
this.BtnChecador.TabIndex = 0;
|
||||
this.BtnChecador.Text = "Checadores";
|
||||
this.BtnChecador.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.BtnChecador.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnChecador.UseVisualStyleBackColor = true;
|
||||
this.BtnChecador.Visible = false;
|
||||
this.BtnChecador.Click += new System.EventHandler(this.ActivateButton);
|
||||
//
|
||||
// PnlLogo
|
||||
//
|
||||
this.PnlLogo.Controls.Add(this.PnlTitle);
|
||||
this.PnlLogo.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.PnlLogo.Location = new System.Drawing.Point(0, 0);
|
||||
this.PnlLogo.Name = "PnlLogo";
|
||||
this.PnlLogo.Size = new System.Drawing.Size(189, 25);
|
||||
this.PnlLogo.TabIndex = 0;
|
||||
//
|
||||
// PnlTitle
|
||||
//
|
||||
this.PnlTitle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.PnlTitle.Controls.Add(this.PnlmenuXD);
|
||||
this.PnlTitle.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.PnlTitle.Location = new System.Drawing.Point(0, 0);
|
||||
this.PnlTitle.Name = "PnlTitle";
|
||||
this.PnlTitle.Size = new System.Drawing.Size(189, 26);
|
||||
this.PnlTitle.TabIndex = 0;
|
||||
this.PnlTitle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ArrastrarForm_MouseDown);
|
||||
//
|
||||
// PnlmenuXD
|
||||
//
|
||||
this.PnlmenuXD.Controls.Add(this.btnmenuXD);
|
||||
this.PnlmenuXD.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.PnlmenuXD.Location = new System.Drawing.Point(155, 0);
|
||||
this.PnlmenuXD.Name = "PnlmenuXD";
|
||||
this.PnlmenuXD.Size = new System.Drawing.Size(34, 26);
|
||||
this.PnlmenuXD.TabIndex = 0;
|
||||
//
|
||||
// btnmenuXD
|
||||
//
|
||||
this.btnmenuXD.FlatAppearance.BorderSize = 0;
|
||||
this.btnmenuXD.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnmenuXD.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.btnmenuXD.Font = new System.Drawing.Font("Segoe UI", 16F);
|
||||
this.btnmenuXD.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.btnmenuXD.IconChar = FontAwesome.Sharp.IconChar.Bars;
|
||||
this.btnmenuXD.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.btnmenuXD.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.btnmenuXD.IconSize = 24;
|
||||
this.btnmenuXD.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.btnmenuXD.Location = new System.Drawing.Point(0, 1);
|
||||
this.btnmenuXD.Name = "btnmenuXD";
|
||||
this.btnmenuXD.Rotation = 0D;
|
||||
this.btnmenuXD.Size = new System.Drawing.Size(34, 26);
|
||||
this.btnmenuXD.TabIndex = 0;
|
||||
this.btnmenuXD.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
|
||||
this.btnmenuXD.UseVisualStyleBackColor = true;
|
||||
this.btnmenuXD.Click += new System.EventHandler(this.BtnMenuShowHide_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Location = new System.Drawing.Point(8, 6);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(44, 40);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new System.EventHandler(this.LblEmpresa_Click);
|
||||
//
|
||||
// PnlTitulo
|
||||
//
|
||||
this.PnlTitulo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.PnlTitulo.Controls.Add(this.LblSubProyecto);
|
||||
this.PnlTitulo.Controls.Add(this.BtnMinimize);
|
||||
this.PnlTitulo.Controls.Add(this.LblEmpresa);
|
||||
this.PnlTitulo.Controls.Add(this.BtnMaximizeRestore);
|
||||
this.PnlTitulo.Controls.Add(this.BtnClose);
|
||||
this.PnlTitulo.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.PnlTitulo.Location = new System.Drawing.Point(0, 0);
|
||||
this.PnlTitulo.Name = "PnlTitulo";
|
||||
this.PnlTitulo.Size = new System.Drawing.Size(1061, 506);
|
||||
this.PnlTitulo.TabIndex = 1;
|
||||
this.PnlTitulo.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ArrastrarForm_MouseDown);
|
||||
//
|
||||
// LblSubProyecto
|
||||
//
|
||||
this.LblSubProyecto.AutoSize = true;
|
||||
this.LblSubProyecto.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.LblSubProyecto.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.LblSubProyecto.Location = new System.Drawing.Point(468, 6);
|
||||
this.LblSubProyecto.Name = "LblSubProyecto";
|
||||
this.LblSubProyecto.Size = new System.Drawing.Size(0, 17);
|
||||
this.LblSubProyecto.TabIndex = 3;
|
||||
//
|
||||
// BtnMinimize
|
||||
//
|
||||
this.BtnMinimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnMinimize.FlatAppearance.BorderSize = 0;
|
||||
this.BtnMinimize.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnMinimize.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnMinimize.IconChar = FontAwesome.Sharp.IconChar.WindowMinimize;
|
||||
this.BtnMinimize.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnMinimize.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnMinimize.IconSize = 20;
|
||||
this.BtnMinimize.Location = new System.Drawing.Point(983, 1);
|
||||
this.BtnMinimize.Name = "BtnMinimize";
|
||||
this.BtnMinimize.Rotation = 0D;
|
||||
this.BtnMinimize.Size = new System.Drawing.Size(26, 24);
|
||||
this.BtnMinimize.TabIndex = 0;
|
||||
this.BtnMinimize.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnMinimize.UseVisualStyleBackColor = true;
|
||||
this.BtnMinimize.Click += new System.EventHandler(this.BtnMinimize_Click);
|
||||
//
|
||||
// LblEmpresa
|
||||
//
|
||||
this.LblEmpresa.AutoSize = true;
|
||||
this.LblEmpresa.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.LblEmpresa.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.LblEmpresa.Location = new System.Drawing.Point(194, 6);
|
||||
this.LblEmpresa.Name = "LblEmpresa";
|
||||
this.LblEmpresa.Size = new System.Drawing.Size(82, 17);
|
||||
this.LblEmpresa.TabIndex = 2;
|
||||
this.LblEmpresa.Text = "ADSISTEMAS";
|
||||
this.LblEmpresa.Click += new System.EventHandler(this.LblEmpresa_Click);
|
||||
//
|
||||
// BtnMaximizeRestore
|
||||
//
|
||||
this.BtnMaximizeRestore.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnMaximizeRestore.FlatAppearance.BorderSize = 0;
|
||||
this.BtnMaximizeRestore.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnMaximizeRestore.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnMaximizeRestore.IconChar = FontAwesome.Sharp.IconChar.WindowMaximize;
|
||||
this.BtnMaximizeRestore.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnMaximizeRestore.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnMaximizeRestore.IconSize = 20;
|
||||
this.BtnMaximizeRestore.Location = new System.Drawing.Point(1009, 1);
|
||||
this.BtnMaximizeRestore.Name = "BtnMaximizeRestore";
|
||||
this.BtnMaximizeRestore.Rotation = 0D;
|
||||
this.BtnMaximizeRestore.Size = new System.Drawing.Size(26, 24);
|
||||
this.BtnMaximizeRestore.TabIndex = 0;
|
||||
this.BtnMaximizeRestore.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnMaximizeRestore.UseVisualStyleBackColor = true;
|
||||
this.BtnMaximizeRestore.Click += new System.EventHandler(this.BtnMaximizeRestore_Click);
|
||||
//
|
||||
// BtnClose
|
||||
//
|
||||
this.BtnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnClose.FlatAppearance.BorderSize = 0;
|
||||
this.BtnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnClose.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnClose.IconChar = FontAwesome.Sharp.IconChar.Times;
|
||||
this.BtnClose.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.BtnClose.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnClose.IconSize = 20;
|
||||
this.BtnClose.Location = new System.Drawing.Point(1035, 1);
|
||||
this.BtnClose.Name = "BtnClose";
|
||||
this.BtnClose.Rotation = 0D;
|
||||
this.BtnClose.Size = new System.Drawing.Size(26, 24);
|
||||
this.BtnClose.TabIndex = 0;
|
||||
this.BtnClose.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnClose.UseVisualStyleBackColor = true;
|
||||
this.BtnClose.Click += new System.EventHandler(this.BtnClose_Click);
|
||||
//
|
||||
// PnlBody
|
||||
//
|
||||
this.PnlBody.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PnlBody.AutoScroll = true;
|
||||
this.PnlBody.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.PnlBody.Controls.Add(this.PnlBodyForms);
|
||||
this.PnlBody.Location = new System.Drawing.Point(189, 87);
|
||||
this.PnlBody.Name = "PnlBody";
|
||||
this.PnlBody.Size = new System.Drawing.Size(869, 416);
|
||||
this.PnlBody.TabIndex = 2;
|
||||
this.PnlBody.SizeChanged += new System.EventHandler(this.PnlBody_SizeChanged);
|
||||
this.PnlBody.Paint += new System.Windows.Forms.PaintEventHandler(this.PnlBody_Paint);
|
||||
//
|
||||
// PnlBodyForms
|
||||
//
|
||||
this.PnlBodyForms.Location = new System.Drawing.Point(0, 0);
|
||||
this.PnlBodyForms.Name = "PnlBodyForms";
|
||||
this.PnlBodyForms.Size = new System.Drawing.Size(188, 186);
|
||||
this.PnlBodyForms.TabIndex = 0;
|
||||
//
|
||||
// PnlTopMenu
|
||||
//
|
||||
this.PnlTopMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(65)))), ((int)(((byte)(80)))));
|
||||
this.PnlTopMenu.Controls.Add(this.pictureBox1);
|
||||
this.PnlTopMenu.Controls.Add(this.LblUsuario);
|
||||
this.PnlTopMenu.Controls.Add(this.IboxUsuario);
|
||||
this.PnlTopMenu.Location = new System.Drawing.Point(189, 26);
|
||||
this.PnlTopMenu.Name = "PnlTopMenu";
|
||||
this.PnlTopMenu.Size = new System.Drawing.Size(878, 61);
|
||||
this.PnlTopMenu.TabIndex = 3;
|
||||
//
|
||||
// LblUsuario
|
||||
//
|
||||
this.LblUsuario.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LblUsuario.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.LblUsuario.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.LblUsuario.Location = new System.Drawing.Point(746, 26);
|
||||
this.LblUsuario.Name = "LblUsuario";
|
||||
this.LblUsuario.Size = new System.Drawing.Size(120, 35);
|
||||
this.LblUsuario.TabIndex = 1;
|
||||
this.LblUsuario.Text = "Usuario este es un texto muy largo que se brincara la lines para no";
|
||||
this.LblUsuario.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// IboxUsuario
|
||||
//
|
||||
this.IboxUsuario.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.IboxUsuario.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(54)))), ((int)(((byte)(65)))), ((int)(((byte)(80)))));
|
||||
this.IboxUsuario.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.IboxUsuario.IconChar = FontAwesome.Sharp.IconChar.Portrait;
|
||||
this.IboxUsuario.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.IboxUsuario.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.IboxUsuario.IconSize = 23;
|
||||
this.IboxUsuario.Location = new System.Drawing.Point(797, 4);
|
||||
this.IboxUsuario.Name = "IboxUsuario";
|
||||
this.IboxUsuario.Size = new System.Drawing.Size(27, 23);
|
||||
this.IboxUsuario.TabIndex = 0;
|
||||
this.IboxUsuario.TabStop = false;
|
||||
//
|
||||
// iconButton2
|
||||
//
|
||||
this.iconButton2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.iconButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.iconButton2.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.iconButton2.Font = new System.Drawing.Font("Segoe UI", 16F);
|
||||
this.iconButton2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.iconButton2.IconChar = FontAwesome.Sharp.IconChar.Bars;
|
||||
this.iconButton2.IconColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(188)))), ((int)(((byte)(200)))));
|
||||
this.iconButton2.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.iconButton2.IconSize = 24;
|
||||
this.iconButton2.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.iconButton2.Location = new System.Drawing.Point(0, 0);
|
||||
this.iconButton2.Name = "iconButton2";
|
||||
this.iconButton2.Rotation = 0D;
|
||||
this.iconButton2.Size = new System.Drawing.Size(40, 30);
|
||||
this.iconButton2.TabIndex = 0;
|
||||
this.iconButton2.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
|
||||
this.iconButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// FrmInicio
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.ClientSize = new System.Drawing.Size(1061, 506);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.PnlTopMenu);
|
||||
this.Controls.Add(this.PnlBody);
|
||||
this.Controls.Add(this.PnlMenu);
|
||||
this.Controls.Add(this.PnlTitulo);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MinimumSize = new System.Drawing.Size(559, 349);
|
||||
this.Name = "FrmInicio";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.PnlMenu.ResumeLayout(false);
|
||||
this.PnlMenu.PerformLayout();
|
||||
this.PnlLogo.ResumeLayout(false);
|
||||
this.PnlTitle.ResumeLayout(false);
|
||||
this.PnlmenuXD.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.PnlTitulo.ResumeLayout(false);
|
||||
this.PnlTitulo.PerformLayout();
|
||||
this.PnlBody.ResumeLayout(false);
|
||||
this.PnlTopMenu.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.IboxUsuario)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel PnlMenu;
|
||||
private System.Windows.Forms.Panel PnlLogo;
|
||||
private FontAwesome.Sharp.IconButton BtnChecador;
|
||||
private FontAwesome.Sharp.IconButton BtnConfiguracion;
|
||||
private FontAwesome.Sharp.IconButton ChecadoresGluyas;
|
||||
private FontAwesome.Sharp.IconButton BtnAsistencia;
|
||||
private FontAwesome.Sharp.IconButton BtnPersonal;
|
||||
private System.Windows.Forms.Panel PnlTitle;
|
||||
private System.Windows.Forms.Panel PnlmenuXD;
|
||||
private FontAwesome.Sharp.IconButton btnmenuXD;
|
||||
private System.Windows.Forms.Panel PnlTitulo;
|
||||
private FontAwesome.Sharp.IconButton BtnClose;
|
||||
private FontAwesome.Sharp.IconButton BtnMaximizeRestore;
|
||||
private FontAwesome.Sharp.IconButton BtnMinimize;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label byadsistemas;
|
||||
private System.Windows.Forms.Panel PnlBody;
|
||||
private System.Windows.Forms.Panel PnlTopMenu;
|
||||
private System.Windows.Forms.Panel PnlBodyForms;
|
||||
private FontAwesome.Sharp.IconPictureBox IboxUsuario;
|
||||
private System.Windows.Forms.Label LblUsuario;
|
||||
private System.Windows.Forms.Label LblEmpresa;
|
||||
private FontAwesome.Sharp.IconButton BtnNomina;
|
||||
private FontAwesome.Sharp.IconButton iconButton2;
|
||||
private FontAwesome.Sharp.IconButton BtnReporte;
|
||||
public System.Windows.Forms.Label LblSubProyecto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
using FontAwesome.Sharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
|
||||
public partial class FrmInicio : Form
|
||||
{
|
||||
const int PnlMenuWidthOpen = 220;
|
||||
const int PnlMenuWidthClose = 68;
|
||||
private IconButton currentBtn;
|
||||
private Form currentForm;
|
||||
private Panel leftBorderBtn;
|
||||
List<string[]> btnestexto;
|
||||
|
||||
public FrmInicio()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||
leftBorderBtn = new Panel();
|
||||
PnlMenu.Controls.Add(leftBorderBtn);
|
||||
LblUsuario.Text = "";//"brenda.martinez@agrojam.com.mx";//UsuarioActual.Nombre;
|
||||
LblEmpresa.Text = "";//"Agroquimicos JAM";//UsuarioActual.Empresa.empresa1Field;
|
||||
btnestexto = new List<string[]>();
|
||||
//PnlMenu.Controls.OfType<Control>().SelectMany(x => x is Button))
|
||||
foreach (Control item in PnlMenu.Controls)
|
||||
{
|
||||
if (item is Button) { btnestexto.Add(new string[] { item.Name, item.Text }); }
|
||||
}
|
||||
//if (ModVarsPV.CveTipoTerminal > 1)
|
||||
//{
|
||||
// activeMenu("BtnComedor");
|
||||
// BtnMenuShowHide_Click(null, null);
|
||||
// this.PnlBody.Width = PnlBody.Width + this.PnlMenu.Width;
|
||||
// this.PnlTopMenu.Width = PnlTopMenu.Width + this.PnlMenu.Width;
|
||||
// this.PnlMenu.Width = 0;
|
||||
// PnlMenu.Visible = false;
|
||||
// PnlTopMenu.Location = new System.Drawing.Point(0, PnlTopMenu.Location.Y);
|
||||
// PnlBody.Location = new System.Drawing.Point(0, PnlBody.Location.Y);
|
||||
//}
|
||||
}
|
||||
#region viewchanges
|
||||
private void BtnMenuShowHide_Click(object sender, EventArgs e)
|
||||
{
|
||||
int restante = PnlMenuWidthOpen - PnlMenuWidthClose;
|
||||
if (PnlMenu.Size.Width == PnlMenuWidthOpen)
|
||||
{
|
||||
this.PnlMenu.Width = PnlMenuWidthClose;
|
||||
//LblEmpresa.Location = new System.Drawing.Point(10, LblEmpresa.Location.Y);
|
||||
PnlTopMenu.Width = PnlTopMenu.Width + restante;
|
||||
PnlTopMenu.Location = new System.Drawing.Point(PnlMenuWidthClose, PnlTopMenu.Location.Y);
|
||||
LblEmpresa.Location = new System.Drawing.Point(LblEmpresa.Location.X - restante, LblEmpresa.Location.Y);
|
||||
this.PnlBody.Width = PnlBody.Width + restante;
|
||||
PnlBody.Location = new System.Drawing.Point(PnlMenuWidthClose, PnlBody.Location.Y);
|
||||
foreach (Control item in PnlMenu.Controls)
|
||||
{
|
||||
if (item is Button) { item.Text = ""; }
|
||||
}
|
||||
/*
|
||||
BtnConfiguracion.Text = "";
|
||||
BtnAsistencia.Text = "";
|
||||
BtnPersonal.Text = "";
|
||||
BtnChecador.Text = "";
|
||||
BtnNomina.Text = "";*/
|
||||
PnlmenuXD.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
PnlmenuXD.Size = new System.Drawing.Size(PnlMenuWidthClose, 30);
|
||||
btnmenuXD.Size = new System.Drawing.Size(PnlMenuWidthClose, 30);
|
||||
btnmenuXD.Padding = new System.Windows.Forms.Padding(0, 0, 20, 0);
|
||||
btnmenuXD.Text = " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
PnlMenu.Width = PnlMenuWidthOpen;
|
||||
//LblEmpresa.Location = new System.Drawing.Point(160, LblEmpresa.Location.Y);
|
||||
LblEmpresa.Location = new System.Drawing.Point(LblEmpresa.Location.X + restante, LblEmpresa.Location.Y);
|
||||
PnlTopMenu.Width = PnlTopMenu.Width - restante;
|
||||
PnlTopMenu.Location = new System.Drawing.Point(PnlMenuWidthOpen, PnlTopMenu.Location.Y);
|
||||
PnlBody.Location = new System.Drawing.Point(PnlMenuWidthOpen, PnlBody.Location.Y);
|
||||
this.PnlBody.Width = PnlBody.Width - restante;
|
||||
foreach (Control item in PnlMenu.Controls)
|
||||
{
|
||||
if (item is Button)
|
||||
{
|
||||
string texto = btnestexto.FirstOrDefault(x => x[0] == item.Name)[1];
|
||||
item.Text = texto == null ? "" : texto;
|
||||
}
|
||||
}/*
|
||||
BtnConfiguracion.Text = "Configuración";
|
||||
BtnAsistencia.Text = "Asistencia";
|
||||
BtnPersonal.Text = "Personal";
|
||||
BtnChecador.Text = "Checadores";
|
||||
BtnNomina.Text = "Nómina";*/
|
||||
PnlmenuXD.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
PnlmenuXD.Size = new System.Drawing.Size(40, 30);
|
||||
btnmenuXD.Size = new System.Drawing.Size(40, 30);
|
||||
btnmenuXD.Padding = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
btnmenuXD.Text = "";
|
||||
|
||||
}
|
||||
}
|
||||
private void setActivateButton(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (currentBtn != sender)
|
||||
{
|
||||
|
||||
if (currentBtn != null)
|
||||
{
|
||||
currentBtn.BackColor = System.Drawing.Color.FromArgb(54, 65, 80);
|
||||
currentBtn.ForeColor = btnmenuXD.ForeColor;
|
||||
currentBtn.TextAlign = ContentAlignment.MiddleLeft;
|
||||
currentBtn.IconColor = Color.Gainsboro;
|
||||
currentBtn.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||
currentBtn.ImageAlign = ContentAlignment.MiddleLeft;
|
||||
}
|
||||
if (sender != null)
|
||||
{
|
||||
Color color = Color.FromArgb(53, 152, 220);
|
||||
//Button
|
||||
currentBtn = (IconButton)sender;
|
||||
currentBtn.BackColor = Color.FromArgb(43, 54, 67);
|
||||
//currentBtn.ForeColor = color;
|
||||
currentBtn.TextAlign = ContentAlignment.MiddleCenter;
|
||||
currentBtn.IconColor = color;
|
||||
currentBtn.TextImageRelation = TextImageRelation.TextBeforeImage;
|
||||
currentBtn.ImageAlign = ContentAlignment.MiddleRight;
|
||||
//Left border button
|
||||
leftBorderBtn.BackColor = color;
|
||||
leftBorderBtn.Size = new Size(7, currentBtn.Size.Height);
|
||||
leftBorderBtn.Location = new Point(0, currentBtn.Location.Y);
|
||||
leftBorderBtn.Visible = true;
|
||||
leftBorderBtn.BringToFront();
|
||||
activeMenu(currentBtn.Name.ToString());
|
||||
}
|
||||
}
|
||||
PnlBody_SizeChanged(PnlBody, null);
|
||||
}
|
||||
private void ActivateButton(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
setActivateButton(sender, e);
|
||||
}
|
||||
private void PnlBody_SizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
int width = PnlBody.Width - 5;
|
||||
int height = PnlBody.Height - 5;
|
||||
|
||||
if (currentForm != null)
|
||||
{
|
||||
if (width < currentForm.MinimumSize.Width)
|
||||
{
|
||||
width = currentForm.MinimumSize.Width;
|
||||
}
|
||||
if (height < currentForm.MinimumSize.Height)
|
||||
{
|
||||
height = currentForm.MinimumSize.Height;
|
||||
}
|
||||
currentForm.Size = new System.Drawing.Size(width, height);
|
||||
|
||||
}
|
||||
PnlBodyForms.Size = new System.Drawing.Size(width, height);
|
||||
}
|
||||
#endregion
|
||||
private void activeMenu(string buttonname)
|
||||
{
|
||||
bool isnewform = false;
|
||||
if (currentForm != null)
|
||||
{
|
||||
currentForm.Hide();
|
||||
currentForm = null;
|
||||
}
|
||||
switch (buttonname)
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
private ;
|
||||
private ;
|
||||
|
||||
.Text = "";
|
||||
.Text = "";*/
|
||||
case "BtnConfiguracion":
|
||||
break;
|
||||
case "BtnPersonal":
|
||||
|
||||
break;
|
||||
case "BtnAsistencia":
|
||||
break;
|
||||
case "BtnChecador":
|
||||
break;
|
||||
case "BtnNomina":
|
||||
break;
|
||||
case "ChecadoresGluyas":
|
||||
isnewform = true;
|
||||
currentForm = new FrmChecadores();
|
||||
break;
|
||||
case "BtnReporte":
|
||||
isnewform = true;
|
||||
currentForm = new FrmReporteChecadores();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (currentForm != null)
|
||||
{
|
||||
if (isnewform)
|
||||
{
|
||||
currentForm.TopLevel = false;
|
||||
currentForm.AutoScroll = true;
|
||||
this.PnlBodyForms.Controls.Add(currentForm);
|
||||
currentForm.FormBorderStyle = FormBorderStyle.None;
|
||||
|
||||
currentForm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
|
||||
}
|
||||
PnlBodyForms.MinimumSize = currentForm.MinimumSize;
|
||||
currentForm.BringToFront();
|
||||
|
||||
currentForm.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
PnlBodyForms.MinimumSize = new System.Drawing.Size(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void LblEmpresa_Click(object sender, EventArgs e)
|
||||
{
|
||||
activeMenu("");
|
||||
}
|
||||
|
||||
private void PnlBody_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void GuardaLog(string mensaje)
|
||||
{
|
||||
ADSNetLibrary.Helpers.ModExtensiones.GuardaLog(mensaje);
|
||||
}
|
||||
public static System.Windows.Forms.DialogResult Alert(string mensage, string Titulo, System.Windows.Forms.MessageBoxButtons botones = System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon Icon = System.Windows.Forms.MessageBoxIcon.None)
|
||||
{
|
||||
System.Windows.Forms.DialogResult result = System.Windows.Forms.DialogResult.None;
|
||||
result = System.Windows.Forms.MessageBox.Show(mensage, Titulo, botones, Icon);
|
||||
//switch (button)
|
||||
//{
|
||||
// case MessageBoxButtons.YesNo:
|
||||
// using (frmYesNo yesNo = new frmYesNo())
|
||||
// {
|
||||
// yesNo.Text = caption;
|
||||
// yesNo.Message = message;
|
||||
// result = yesNo.ShowDialog();
|
||||
// }
|
||||
// break;
|
||||
// case MessageBoxButtons.OK:
|
||||
// using (frmOK ok = new frmOK())
|
||||
// {
|
||||
// ok.Text = caption;
|
||||
// ok.Message = message;
|
||||
// result = ok.ShowDialog();
|
||||
// }
|
||||
// break;
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
|
||||
//UtileriasServiceWCF.ResponseLogin UserV2
|
||||
//public WCF_PV.Usuario UsuarioActual { get { return ModVarsPV.UsuarioActual; } set { ModVarsPV.UsuarioActual = value; } }
|
||||
#region "F U N C I O N E S D E W I N D O W S"
|
||||
#region "mover /arrastrar formulario"
|
||||
|
||||
private const int WM_NCLBUTTONDOWN = 0xA1;
|
||||
private const int HT_CAPTION = 0x2;
|
||||
[DllImportAttribute("user32.dll")]
|
||||
private static extern int SendMessage(IntPtr hWnd,
|
||||
int Msg, int wParam, int lParam);
|
||||
[DllImportAttribute("user32.dll")]
|
||||
private static extern bool ReleaseCapture();
|
||||
|
||||
#endregion
|
||||
#region colorbar
|
||||
//[DllImport("User32.dll", CharSet = CharSet.Auto)]
|
||||
//public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
|
||||
|
||||
//[DllImport("User32.dll")]
|
||||
//private static extern IntPtr GetWindowDC(IntPtr hWnd);
|
||||
|
||||
//protected override void WndProc(ref Message m)
|
||||
//{
|
||||
// base.WndProc(ref m);
|
||||
// const int WM_NCPAINT = 0x85;
|
||||
// if (m.Msg == WM_NCPAINT)
|
||||
// {
|
||||
// IntPtr hdc = GetWindowDC(m.HWnd);
|
||||
// if ((int)hdc != 0)
|
||||
// {
|
||||
// Graphics g = Graphics.FromHdc(hdc);
|
||||
// g.FillRectangle(Brushes.Green, new Rectangle(0, 0, 4800, 23));
|
||||
// g.Flush();
|
||||
// ReleaseDC(m.HWnd, hdc);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
public void ArrastrarForm_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
|
||||
}
|
||||
|
||||
}
|
||||
public void BtnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
|
||||
public void BtnMaximizeRestore_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (WindowState == FormWindowState.Maximized)
|
||||
{
|
||||
WindowState = FormWindowState.Normal;
|
||||
((IconButton)sender).IconChar = FontAwesome.Sharp.IconChar.WindowMaximize;
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowState = FormWindowState.Maximized;
|
||||
((IconButton)sender).IconChar = FontAwesome.Sharp.IconChar.WindowRestore;
|
||||
|
||||
}
|
||||
}
|
||||
public void BtnMinimize_Click(object sender, EventArgs e)
|
||||
{
|
||||
WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
303
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmLogin.Designer.cs
generated
Normal file
303
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmLogin.Designer.cs
generated
Normal file
@@ -0,0 +1,303 @@
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
partial class FrmLogin
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmLogin));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.PbxLogo = new System.Windows.Forms.PictureBox();
|
||||
this.TxtUsuario = new System.Windows.Forms.TextBox();
|
||||
this.PBiUsuario = new FontAwesome.Sharp.IconPictureBox();
|
||||
this.PbiPassword = new FontAwesome.Sharp.IconPictureBox();
|
||||
this.TxtPassword = new System.Windows.Forms.TextBox();
|
||||
this.btnClose = new FontAwesome.Sharp.IconButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.BtnLogin = new System.Windows.Forms.Button();
|
||||
this.BtnMinimizar = new FontAwesome.Sharp.IconButton();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.BtnMostrarPass = new FontAwesome.Sharp.IconPictureBox();
|
||||
this.Loader = new System.Windows.Forms.PictureBox();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PbxLogo)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PBiUsuario)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PbiPassword)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.BtnMostrarPass)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Loader)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.PbxLogo);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(214, 269);
|
||||
this.panel1.TabIndex = 0;
|
||||
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.WFLogin_MouseDown);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(51, 245);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(68, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "versión 1.0.0";
|
||||
//
|
||||
// PbxLogo
|
||||
//
|
||||
this.PbxLogo.Image = global::ADSUtileriasNetFrame.Properties.Resources.LOGOADS;
|
||||
this.PbxLogo.Location = new System.Drawing.Point(10, 52);
|
||||
this.PbxLogo.Name = "PbxLogo";
|
||||
this.PbxLogo.Size = new System.Drawing.Size(195, 165);
|
||||
this.PbxLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.PbxLogo.TabIndex = 0;
|
||||
this.PbxLogo.TabStop = false;
|
||||
this.PbxLogo.MouseDown += new System.Windows.Forms.MouseEventHandler(this.WFLogin_MouseDown);
|
||||
//
|
||||
// TxtUsuario
|
||||
//
|
||||
this.TxtUsuario.AcceptsReturn = true;
|
||||
this.TxtUsuario.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtUsuario.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.TxtUsuario.Font = new System.Drawing.Font("Segoe UI", 14F);
|
||||
this.TxtUsuario.Location = new System.Drawing.Point(296, 78);
|
||||
this.TxtUsuario.Name = "TxtUsuario";
|
||||
this.TxtUsuario.Size = new System.Drawing.Size(257, 25);
|
||||
this.TxtUsuario.TabIndex = 1;
|
||||
this.TxtUsuario.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TxtUsuario_KeyUp);
|
||||
//
|
||||
// PBiUsuario
|
||||
//
|
||||
this.PBiUsuario.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.PBiUsuario.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.PBiUsuario.IconChar = FontAwesome.Sharp.IconChar.User;
|
||||
this.PBiUsuario.IconColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.PBiUsuario.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.PBiUsuario.IconSize = 21;
|
||||
this.PBiUsuario.Location = new System.Drawing.Point(266, 78);
|
||||
this.PBiUsuario.Name = "PBiUsuario";
|
||||
this.PBiUsuario.Size = new System.Drawing.Size(21, 22);
|
||||
this.PBiUsuario.TabIndex = 2;
|
||||
this.PBiUsuario.TabStop = false;
|
||||
//
|
||||
// PbiPassword
|
||||
//
|
||||
this.PbiPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.PbiPassword.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.PbiPassword.IconChar = FontAwesome.Sharp.IconChar.Lock;
|
||||
this.PbiPassword.IconColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.PbiPassword.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.PbiPassword.IconSize = 21;
|
||||
this.PbiPassword.Location = new System.Drawing.Point(266, 126);
|
||||
this.PbiPassword.Name = "PbiPassword";
|
||||
this.PbiPassword.Size = new System.Drawing.Size(21, 22);
|
||||
this.PbiPassword.TabIndex = 3;
|
||||
this.PbiPassword.TabStop = false;
|
||||
//
|
||||
// TxtPassword
|
||||
//
|
||||
this.TxtPassword.AcceptsReturn = true;
|
||||
this.TxtPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtPassword.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.TxtPassword.Font = new System.Drawing.Font("Segoe UI", 14F);
|
||||
this.TxtPassword.Location = new System.Drawing.Point(296, 126);
|
||||
this.TxtPassword.Name = "TxtPassword";
|
||||
this.TxtPassword.Size = new System.Drawing.Size(257, 25);
|
||||
this.TxtPassword.TabIndex = 2;
|
||||
this.TxtPassword.UseSystemPasswordChar = true;
|
||||
this.TxtPassword.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TxtUsuario_KeyUp);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.FlatAppearance.BorderSize = 0;
|
||||
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.btnClose.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.btnClose.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.btnClose.IconChar = FontAwesome.Sharp.IconChar.Times;
|
||||
this.btnClose.IconColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.btnClose.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.btnClose.IconSize = 20;
|
||||
this.btnClose.Location = new System.Drawing.Point(579, 2);
|
||||
this.btnClose.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Rotation = 0D;
|
||||
this.btnClose.Size = new System.Drawing.Size(21, 22);
|
||||
this.btnClose.TabIndex = 0;
|
||||
this.btnClose.UseVisualStyleBackColor = false;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Open Sans", 15.75F, System.Drawing.FontStyle.Bold);
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.label1.Location = new System.Drawing.Point(347, 17);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(154, 28);
|
||||
this.label1.TabIndex = 4;
|
||||
this.label1.Text = "Iniciar sesión";
|
||||
//
|
||||
// BtnLogin
|
||||
//
|
||||
this.BtnLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.BtnLogin.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(28)))), ((int)(((byte)(28)))));
|
||||
this.BtnLogin.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.BtnLogin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnLogin.Font = new System.Drawing.Font("Open Sans", 12F);
|
||||
this.BtnLogin.ForeColor = System.Drawing.Color.LightGray;
|
||||
this.BtnLogin.Location = new System.Drawing.Point(266, 199);
|
||||
this.BtnLogin.Name = "BtnLogin";
|
||||
this.BtnLogin.Size = new System.Drawing.Size(283, 35);
|
||||
this.BtnLogin.TabIndex = 5;
|
||||
this.BtnLogin.Text = "ENTRAR";
|
||||
this.BtnLogin.UseVisualStyleBackColor = false;
|
||||
this.BtnLogin.Click += new System.EventHandler(this.BtnLogin_Click);
|
||||
//
|
||||
// BtnMinimizar
|
||||
//
|
||||
this.BtnMinimizar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnMinimizar.FlatAppearance.BorderSize = 0;
|
||||
this.BtnMinimizar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnMinimizar.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnMinimizar.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnMinimizar.IconChar = FontAwesome.Sharp.IconChar.WindowMinimize;
|
||||
this.BtnMinimizar.IconColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnMinimizar.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnMinimizar.IconSize = 20;
|
||||
this.BtnMinimizar.Location = new System.Drawing.Point(553, 2);
|
||||
this.BtnMinimizar.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.BtnMinimizar.Name = "BtnMinimizar";
|
||||
this.BtnMinimizar.Rotation = 0D;
|
||||
this.BtnMinimizar.Size = new System.Drawing.Size(21, 22);
|
||||
this.BtnMinimizar.TabIndex = 0;
|
||||
this.BtnMinimizar.UseVisualStyleBackColor = false;
|
||||
this.BtnMinimizar.Click += new System.EventHandler(this.btnMinimizar);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Open Sans", 9F, System.Drawing.FontStyle.Bold);
|
||||
this.label3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.label3.Location = new System.Drawing.Point(360, 247);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(113, 17);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "BY ADSISTEMAS";
|
||||
//
|
||||
// BtnMostrarPass
|
||||
//
|
||||
this.BtnMostrarPass.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.BtnMostrarPass.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnMostrarPass.IconChar = FontAwesome.Sharp.IconChar.EyeSlash;
|
||||
this.BtnMostrarPass.IconColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnMostrarPass.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnMostrarPass.IconSize = 22;
|
||||
this.BtnMostrarPass.Location = new System.Drawing.Point(553, 126);
|
||||
this.BtnMostrarPass.Name = "BtnMostrarPass";
|
||||
this.BtnMostrarPass.Size = new System.Drawing.Size(27, 22);
|
||||
this.BtnMostrarPass.TabIndex = 8;
|
||||
this.BtnMostrarPass.TabStop = false;
|
||||
this.BtnMostrarPass.Click += new System.EventHandler(this.BtnMostrarPass_Click);
|
||||
//
|
||||
// Loader
|
||||
//
|
||||
this.Loader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.Loader.Image = global::ADSUtileriasNetFrame.Properties.Resources.Loader;
|
||||
this.Loader.Location = new System.Drawing.Point(380, 153);
|
||||
this.Loader.Name = "Loader";
|
||||
this.Loader.Size = new System.Drawing.Size(52, 42);
|
||||
this.Loader.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.Loader.TabIndex = 9;
|
||||
this.Loader.TabStop = false;
|
||||
this.Loader.Visible = false;
|
||||
//
|
||||
// FrmLogin
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(15)))), ((int)(((byte)(15)))), ((int)(((byte)(15)))));
|
||||
this.ClientSize = new System.Drawing.Size(600, 269);
|
||||
this.Controls.Add(this.Loader);
|
||||
this.Controls.Add(this.BtnMostrarPass);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.BtnMinimizar);
|
||||
this.Controls.Add(this.BtnLogin);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.btnClose);
|
||||
this.Controls.Add(this.TxtPassword);
|
||||
this.Controls.Add(this.PbiPassword);
|
||||
this.Controls.Add(this.PBiUsuario);
|
||||
this.Controls.Add(this.TxtUsuario);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FrmLogin";
|
||||
this.Opacity = 0.9D;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Login";
|
||||
this.Load += new System.EventHandler(this.WFLogin_Load);
|
||||
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.WFLogin_MouseDown);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PbxLogo)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PBiUsuario)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PbiPassword)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.BtnMostrarPass)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Loader)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.PictureBox PbxLogo;
|
||||
private System.Windows.Forms.TextBox TxtUsuario;
|
||||
private FontAwesome.Sharp.IconPictureBox PBiUsuario;
|
||||
private FontAwesome.Sharp.IconPictureBox PbiPassword;
|
||||
private System.Windows.Forms.TextBox TxtPassword;
|
||||
private FontAwesome.Sharp.IconButton btnClose;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button BtnLogin;
|
||||
private FontAwesome.Sharp.IconButton BtnMinimizar;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private FontAwesome.Sharp.IconPictureBox BtnMostrarCaracteres;
|
||||
private FontAwesome.Sharp.IconPictureBox BtnMostrarPass;
|
||||
private System.Windows.Forms.PictureBox Loader;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
public partial class FrmLogin : FormBase
|
||||
{
|
||||
public FrmLogin()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
//this.PnlLoader.BackColor = System.Drawing.Color.FromArgb(25, System.Drawing.Color.Black);
|
||||
//this.SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
private void btnMinimizar(object sender, EventArgs e)
|
||||
{
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
#region "mover /arrastrar formulario"
|
||||
[DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]
|
||||
private extern static void ReleaseCapture();
|
||||
|
||||
[DllImport("user32.DLL", EntryPoint = "SendMessage")]
|
||||
private extern static void SendMessage(System.IntPtr hwnd, int wmsg, int wparam, int lparam);
|
||||
private void WFLogin_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(this.Handle, 0x112, 0xf012, 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void Login()
|
||||
{
|
||||
|
||||
BtnLogin.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
Loader.Visible = true;
|
||||
TxtUsuario.Enabled = false;
|
||||
TxtPassword.Enabled = false;
|
||||
BtnLogin.Enabled = false;
|
||||
});
|
||||
|
||||
bool continuar = true;
|
||||
string msgboxstring = "";
|
||||
string usuario = TxtUsuario.Text;
|
||||
string password = TxtPassword.Text;
|
||||
if (usuario.Trim().Length == 0)
|
||||
{
|
||||
msgboxstring = string.Format("{0}El campo 'Usuario' es necesario\r\n", msgboxstring);
|
||||
continuar = false;
|
||||
}
|
||||
if (password.Trim().Length == 0)
|
||||
{
|
||||
msgboxstring = string.Format("{0}El campo 'Password' es necesario\r\n", msgboxstring);
|
||||
continuar = false;
|
||||
}
|
||||
|
||||
if (continuar)
|
||||
{
|
||||
if (usuario == "Admin" && password == "SIG159753")
|
||||
{
|
||||
continuar = true;
|
||||
|
||||
BtnLogin.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.Close();
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
msgboxstring = string.Format("{0}Usuario no valido\r\n", msgboxstring);
|
||||
}
|
||||
}
|
||||
BtnLogin.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
Alert(msgboxstring, "Login");
|
||||
});
|
||||
BtnLogin.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
BtnLogin.Enabled = true;
|
||||
TxtUsuario.Enabled = true;
|
||||
TxtPassword.Enabled = true;
|
||||
Loader.Visible = false;
|
||||
});
|
||||
}
|
||||
private void BtnLogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Login();
|
||||
System.Threading.ThreadStart threadStart = new System.Threading.ThreadStart(Login);
|
||||
System.Threading.Thread thread = new System.Threading.Thread(threadStart);
|
||||
thread.SetApartmentState(System.Threading.ApartmentState.STA);
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
private void TxtUsuario_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Enter:
|
||||
{
|
||||
System.Threading.ThreadStart threadStart = new System.Threading.ThreadStart(Login);
|
||||
System.Threading.Thread thread = new System.Threading.Thread(threadStart);
|
||||
thread.SetApartmentState(System.Threading.ApartmentState.STA);
|
||||
thread.Start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Iniciarservicio()
|
||||
{
|
||||
|
||||
}
|
||||
private void WFLogin_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
System.Threading.ThreadStart threadStart = new System.Threading.ThreadStart(Iniciarservicio);
|
||||
System.Threading.Thread thread = new System.Threading.Thread(threadStart);
|
||||
thread.SetApartmentState(System.Threading.ApartmentState.STA);
|
||||
thread.Start();
|
||||
}
|
||||
private void BtnMostrarPass_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.TxtPassword.UseSystemPasswordChar = !this.TxtPassword.UseSystemPasswordChar;
|
||||
if (this.TxtPassword.UseSystemPasswordChar)
|
||||
{
|
||||
this.BtnMostrarPass.IconChar = FontAwesome.Sharp.IconChar.EyeSlash;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BtnMostrarPass.IconChar = FontAwesome.Sharp.IconChar.Eye;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region "Instalar servicio"
|
||||
//private static string GetParentUriString(string filePath)
|
||||
//{
|
||||
// Uri uri = new Uri(filePath);
|
||||
// return HttpUtility.UrlDecode(uri.AbsoluteUri.Remove(uri.AbsoluteUri.Length - uri.Segments[uri.Segments.Length - 1].Length - uri.Query.Length).Remove(0, 8));
|
||||
//}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
324
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmReporteChecadores.Designer.cs
generated
Normal file
324
Soluciones/ADSUtileriasWF/ADSUtileriasNetFrame/Views/Gluyas/FrmReporteChecadores.Designer.cs
generated
Normal file
@@ -0,0 +1,324 @@
|
||||
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
partial class FrmReporteChecadores
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmReporteChecadores));
|
||||
this.PnlReporte = new System.Windows.Forms.Panel();
|
||||
this.DTGVReporte = new System.Windows.Forms.DataGridView();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.BtnDescargar = new FontAwesome.Sharp.IconButton();
|
||||
this.BtnGenerar = new FontAwesome.Sharp.IconButton();
|
||||
this.TxtSelecPuerto = new System.Windows.Forms.TextBox();
|
||||
this.TxtSelectIP = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.LblReporte = new System.Windows.Forms.Label();
|
||||
this.DdlReporte = new System.Windows.Forms.ComboBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.DdlChecadores = new System.Windows.Forms.ComboBox();
|
||||
this.txtFechaFin = new System.Windows.Forms.DateTimePicker();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtFechaInicio = new System.Windows.Forms.DateTimePicker();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.PnlReporte.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.DTGVReporte)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PnlReporte
|
||||
//
|
||||
this.PnlReporte.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PnlReporte.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
|
||||
this.PnlReporte.Controls.Add(this.DTGVReporte);
|
||||
this.PnlReporte.Location = new System.Drawing.Point(3, 159);
|
||||
this.PnlReporte.Name = "PnlReporte";
|
||||
this.PnlReporte.Size = new System.Drawing.Size(501, 166);
|
||||
this.PnlReporte.TabIndex = 3;
|
||||
//
|
||||
// DTGVReporte
|
||||
//
|
||||
this.DTGVReporte.AllowUserToAddRows = false;
|
||||
this.DTGVReporte.AllowUserToDeleteRows = false;
|
||||
this.DTGVReporte.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
|
||||
this.DTGVReporte.BackgroundColor = System.Drawing.SystemColors.GradientInactiveCaption;
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.DTGVReporte.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.DTGVReporte.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.DTGVReporte.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.DTGVReporte.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.DTGVReporte.Location = new System.Drawing.Point(0, 0);
|
||||
this.DTGVReporte.Name = "DTGVReporte";
|
||||
this.DTGVReporte.RowTemplate.Height = 25;
|
||||
this.DTGVReporte.Size = new System.Drawing.Size(501, 166);
|
||||
this.DTGVReporte.TabIndex = 0;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.BtnDescargar);
|
||||
this.groupBox1.Controls.Add(this.BtnGenerar);
|
||||
this.groupBox1.Controls.Add(this.TxtSelecPuerto);
|
||||
this.groupBox1.Controls.Add(this.TxtSelectIP);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.LblReporte);
|
||||
this.groupBox1.Controls.Add(this.DdlReporte);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.DdlChecadores);
|
||||
this.groupBox1.Controls.Add(this.txtFechaFin);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
this.groupBox1.Controls.Add(this.txtFechaInicio);
|
||||
this.groupBox1.Controls.Add(this.label1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(3, 3);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(501, 150);
|
||||
this.groupBox1.TabIndex = 2;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Filtro";
|
||||
//
|
||||
// BtnDescargar
|
||||
//
|
||||
this.BtnDescargar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnDescargar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.BtnDescargar.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnDescargar.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.BtnDescargar.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnDescargar.IconChar = FontAwesome.Sharp.IconChar.FileExcel;
|
||||
this.BtnDescargar.IconColor = System.Drawing.Color.White;
|
||||
this.BtnDescargar.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnDescargar.IconSize = 32;
|
||||
this.BtnDescargar.Location = new System.Drawing.Point(373, 101);
|
||||
this.BtnDescargar.Name = "BtnDescargar";
|
||||
this.BtnDescargar.Rotation = 0D;
|
||||
this.BtnDescargar.Size = new System.Drawing.Size(118, 43);
|
||||
this.BtnDescargar.TabIndex = 13;
|
||||
this.BtnDescargar.Text = "Descargar";
|
||||
this.BtnDescargar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnDescargar.UseVisualStyleBackColor = false;
|
||||
this.BtnDescargar.Click += new System.EventHandler(this.BtnDescargar_Click);
|
||||
//
|
||||
// BtnGenerar
|
||||
//
|
||||
this.BtnGenerar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnGenerar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(54)))), ((int)(((byte)(67)))));
|
||||
this.BtnGenerar.Flip = FontAwesome.Sharp.FlipOrientation.Normal;
|
||||
this.BtnGenerar.Font = new System.Drawing.Font("Open Sans", 9F);
|
||||
this.BtnGenerar.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.BtnGenerar.IconChar = FontAwesome.Sharp.IconChar.FileExport;
|
||||
this.BtnGenerar.IconColor = System.Drawing.Color.White;
|
||||
this.BtnGenerar.IconFont = FontAwesome.Sharp.IconFont.Auto;
|
||||
this.BtnGenerar.IconSize = 32;
|
||||
this.BtnGenerar.Location = new System.Drawing.Point(266, 101);
|
||||
this.BtnGenerar.Name = "BtnGenerar";
|
||||
this.BtnGenerar.Rotation = 0D;
|
||||
this.BtnGenerar.Size = new System.Drawing.Size(101, 43);
|
||||
this.BtnGenerar.TabIndex = 12;
|
||||
this.BtnGenerar.Text = "Generar";
|
||||
this.BtnGenerar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.BtnGenerar.UseVisualStyleBackColor = false;
|
||||
this.BtnGenerar.Click += new System.EventHandler(this.BtnGenerar_Click);
|
||||
//
|
||||
// TxtSelecPuerto
|
||||
//
|
||||
this.TxtSelecPuerto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtSelecPuerto.Enabled = false;
|
||||
this.TxtSelecPuerto.Location = new System.Drawing.Point(186, 73);
|
||||
this.TxtSelecPuerto.Name = "TxtSelecPuerto";
|
||||
this.TxtSelecPuerto.Size = new System.Drawing.Size(51, 20);
|
||||
this.TxtSelecPuerto.TabIndex = 11;
|
||||
//
|
||||
// TxtSelectIP
|
||||
//
|
||||
this.TxtSelectIP.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtSelectIP.Enabled = false;
|
||||
this.TxtSelectIP.Location = new System.Drawing.Point(18, 72);
|
||||
this.TxtSelectIP.Name = "TxtSelectIP";
|
||||
this.TxtSelectIP.Size = new System.Drawing.Size(150, 20);
|
||||
this.TxtSelectIP.TabIndex = 10;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(186, 55);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(38, 13);
|
||||
this.label5.TabIndex = 9;
|
||||
this.label5.Text = "Puerto";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(18, 57);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(17, 13);
|
||||
this.label4.TabIndex = 8;
|
||||
this.label4.Text = "IP";
|
||||
//
|
||||
// LblReporte
|
||||
//
|
||||
this.LblReporte.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LblReporte.AutoSize = true;
|
||||
this.LblReporte.Location = new System.Drawing.Point(257, 15);
|
||||
this.LblReporte.Name = "LblReporte";
|
||||
this.LblReporte.Size = new System.Drawing.Size(45, 13);
|
||||
this.LblReporte.TabIndex = 7;
|
||||
this.LblReporte.Text = "Reporte";
|
||||
//
|
||||
// DdlReporte
|
||||
//
|
||||
this.DdlReporte.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.DdlReporte.FormattingEnabled = true;
|
||||
this.DdlReporte.Location = new System.Drawing.Point(257, 33);
|
||||
this.DdlReporte.Name = "DdlReporte";
|
||||
this.DdlReporte.Size = new System.Drawing.Size(235, 21);
|
||||
this.DdlReporte.TabIndex = 6;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(18, 15);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(53, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Checador";
|
||||
//
|
||||
// DdlChecadores
|
||||
//
|
||||
this.DdlChecadores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.DdlChecadores.FormattingEnabled = true;
|
||||
this.DdlChecadores.Location = new System.Drawing.Point(18, 33);
|
||||
this.DdlChecadores.Name = "DdlChecadores";
|
||||
this.DdlChecadores.Size = new System.Drawing.Size(219, 21);
|
||||
this.DdlChecadores.TabIndex = 4;
|
||||
this.DdlChecadores.SelectedIndexChanged += new System.EventHandler(this.DdlChecadores_SelectedIndexChanged);
|
||||
//
|
||||
// txtFechaFin
|
||||
//
|
||||
this.txtFechaFin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtFechaFin.CustomFormat = "dd/MM/yyyy HH:mm";
|
||||
this.txtFechaFin.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.txtFechaFin.Location = new System.Drawing.Point(381, 73);
|
||||
this.txtFechaFin.Name = "txtFechaFin";
|
||||
this.txtFechaFin.Size = new System.Drawing.Size(110, 20);
|
||||
this.txtFechaFin.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(381, 57);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.label2.Size = new System.Drawing.Size(51, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Fecha fin";
|
||||
//
|
||||
// txtFechaInicio
|
||||
//
|
||||
this.txtFechaInicio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtFechaInicio.CustomFormat = "dd/MM/yyyy HH:mm";
|
||||
this.txtFechaInicio.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.txtFechaInicio.Location = new System.Drawing.Point(257, 73);
|
||||
this.txtFechaInicio.Name = "txtFechaInicio";
|
||||
this.txtFechaInicio.Size = new System.Drawing.Size(110, 20);
|
||||
this.txtFechaInicio.TabIndex = 1;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(257, 57);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.label1.Size = new System.Drawing.Size(64, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Fecha inicio";
|
||||
//
|
||||
// FrmReporteChecadores
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(510, 330);
|
||||
this.Controls.Add(this.PnlReporte);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FrmReporteChecadores";
|
||||
this.Text = "ReporteChecadores";
|
||||
this.Load += new System.EventHandler(this.ReporteChecadores_Load);
|
||||
this.PnlReporte.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.DTGVReporte)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel PnlReporte;
|
||||
private System.Windows.Forms.DataGridView DTGVReporte;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private FontAwesome.Sharp.IconButton BtnDescargar;
|
||||
private FontAwesome.Sharp.IconButton BtnGenerar;
|
||||
private System.Windows.Forms.TextBox TxtSelecPuerto;
|
||||
private System.Windows.Forms.TextBox TxtSelectIP;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label LblReporte;
|
||||
private System.Windows.Forms.ComboBox DdlReporte;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox DdlChecadores;
|
||||
private System.Windows.Forms.DateTimePicker txtFechaFin;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.DateTimePicker txtFechaInicio;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,329 @@
|
||||
using ADSUtileriasNetFrame.Conexiones.Local.Gluyas;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using ADSNetLibrary.Helpers;
|
||||
namespace ADSUtileriasNetFrame.Views.Gluyas
|
||||
{
|
||||
public partial class FrmReporteChecadores : Form
|
||||
{
|
||||
|
||||
DataTable DtAsistencia;
|
||||
private void ReporteChecadores_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
loadchecadores(); LoadReportes();
|
||||
}
|
||||
|
||||
public void loadchecadores()
|
||||
{
|
||||
DataTable dtChecadores = new DataTable();
|
||||
ClsBD chk = new ClsBD();
|
||||
string sqlEjecuta = "SELECT * FROM CHECADORES;";
|
||||
dtChecadores = chk.EjecutaSqlDT(sqlEjecuta);
|
||||
DataTable dt = new DataTable();
|
||||
sqlEjecuta = "SELECT IDCHECADOR,NOMBRE FROM CHECADORES UNION SELECT 0 AS IDCHECADOR, 'Seleccione checador...' AS NOMBRE ORDER BY IDCHECADOR,NOMBRE;";
|
||||
dt = chk.EjecutaSqlDT(sqlEjecuta);
|
||||
|
||||
DdlChecadores.DataSource = dt;
|
||||
DdlChecadores.DisplayMember = "nombre";
|
||||
DdlChecadores.ValueMember = "IDCHECADOR";
|
||||
DdlChecadores.Refresh();
|
||||
chk.Desconectar();
|
||||
}
|
||||
public void LoadReportes()
|
||||
{
|
||||
|
||||
DataTable dt = new DataTable();
|
||||
ClsBD chk = new ClsBD();
|
||||
string sqlEjecuta = "SELECT 0 AS IdReporte, 'Asistencia' AS Nombre ORDER BY IdReporte;";
|
||||
dt = chk.EjecutaSqlDT(sqlEjecuta);
|
||||
|
||||
DdlReporte.DataSource = dt;
|
||||
DdlReporte.DisplayMember = "Nombre";
|
||||
DdlReporte.ValueMember = "IdReporte";
|
||||
DdlReporte.Refresh();
|
||||
chk.Desconectar();
|
||||
}
|
||||
public FrmReporteChecadores()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
private void BtnGenerar_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataTable dt_periodLog = new DataTable("dt_periodLog");
|
||||
DtAsistencia = new DataTable("Asistencia");
|
||||
const string formatfecha = "yyyy/MM/dd HH:mm:ss";
|
||||
DateTime dfechai = txtFechaInicio.Text.ToDateTime();
|
||||
DateTime dfechaf = txtFechaFin.Text.ToDateTime();
|
||||
if (dfechai <= dfechaf)
|
||||
{
|
||||
DateTime datei = dfechai.ToString("yyyy/MM/dd").ToDateTime();
|
||||
DateTime datef = dfechaf.ToString("yyyy/MM/dd").ToDateTime();
|
||||
DateTime date = datei.AddDays(-1);
|
||||
string fechai = dfechai.ToString(formatfecha);
|
||||
string fechaf = dfechaf.ToString(formatfecha);
|
||||
List<string> listafecha = new List<string>();
|
||||
List<string[]> ListEmpleados = new List<string[]>();
|
||||
while ((date = date.AddDays(1)) <= datef)
|
||||
{
|
||||
string fecha = $"{date.ToString("dddd", new System.Globalization.CultureInfo("es-MX"))}\r\n{date:dd-MM-yyyy}";
|
||||
listafecha.Add(fecha);
|
||||
}
|
||||
|
||||
this.DTGVReporte.AutoSizeColumnsMode = listafecha.Count <= 7 ? System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill : System.Windows.Forms.DataGridViewAutoSizeColumnsMode.None;
|
||||
DTGVReporte.AutoGenerateColumns = true;
|
||||
DTGVReporte.Columns.Clear();
|
||||
dt_periodLog.Columns.Add("NOEMPLEADO", System.Type.GetType("System.String"));
|
||||
dt_periodLog.Columns.Add("FECHA", System.Type.GetType("System.String"));
|
||||
dt_periodLog.Columns.Add("HORA", System.Type.GetType("System.String"));
|
||||
|
||||
//clsFuncionesChk clsFunciones = new clsFuncionesChk();
|
||||
//clsGlobales extras = new clsGlobales();
|
||||
//extras.ShowStatusBar("Generando informe...espere por favor", true, lblBarra);
|
||||
//lblBarra.Refresh();
|
||||
string sdwEnrollNumber = "";
|
||||
int idwMachin = 1;
|
||||
int idwVerifyMode = 0;
|
||||
int idwInOutMode = 0;
|
||||
int idwYear = 0;
|
||||
int idwMonth = 0;
|
||||
int idwDay = 0;
|
||||
int idwHour = 0;
|
||||
int idwMinute = 0;
|
||||
int idwSecond = 0;
|
||||
int idwWorkcode = 0;
|
||||
zkemkeeper.CZKEM conectarse = new zkemkeeper.CZKEM();
|
||||
bool conectado = false;
|
||||
int contador=0;
|
||||
try
|
||||
{
|
||||
conectado = conectarse.Connect_Net(TxtSelectIP.Text, TxtSelecPuerto.Text.ToEntero());
|
||||
contador = 1;
|
||||
bool isenabledevice = conectarse.EnableDevice(idwMachin, false);
|
||||
DataTable dtEmpleados = GetEmpleados(conectarse, idwMachin);
|
||||
contador = 2;
|
||||
|
||||
bool lectura = conectarse.ReadTimeGLogData(idwMachin, fechai, fechaf);
|
||||
contador = 3;
|
||||
|
||||
while (conectarse.SSR_GetGeneralLogData(idwMachin, out sdwEnrollNumber, out idwVerifyMode, out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, idwWorkcode))
|
||||
{
|
||||
DataRow dr = dt_periodLog.NewRow();
|
||||
dr["NOEMPLEADO"] = sdwEnrollNumber;
|
||||
DateTime dfecha = $"{idwYear}-{(idwMonth < 10 ? "0" : "")}{idwMonth}-{(idwDay < 10 ? "0" : "")}{ idwDay} {(idwHour < 10 ? "0" : "")}{idwHour}:{(idwMinute < 10 ? "0" : "")}{idwMinute}".ToDateTime();
|
||||
if (dfecha >= dfechai && dfecha <= dfechaf)
|
||||
{
|
||||
if (ListEmpleados.FindAll(x => x[0] == sdwEnrollNumber).Count == 0)
|
||||
{
|
||||
string nombre = "";
|
||||
if (sdwEnrollNumber.Trim().Length > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow item in dtEmpleados.Select($"NOEMPLEADO = '{sdwEnrollNumber}'"))
|
||||
{
|
||||
nombre = item["NOMBRE"].ToString();
|
||||
}
|
||||
}
|
||||
ListEmpleados.Add(new string[] { sdwEnrollNumber, nombre });
|
||||
}
|
||||
string fecha = $"{dfecha.ToString("dddd", new System.Globalization.CultureInfo("es-MX"))}\r\n{dfecha:dd-MM-yyyy}";
|
||||
//if (listafecha.FindAll(x => x == fecha).Count == 0) { listafecha.Add(fecha); }
|
||||
dr["FECHA"] = fecha;// + " " + idwHour.ToString() + ":" + idwMinute.ToString() + ":" + idwSecond.ToString();
|
||||
dr["HORA"] = $"{(idwHour < 10 ? "0" : "")}{idwHour}:{(idwMinute < 10 ? "0" : "")}{idwMinute}";// + ":" + idwSecond.ToString();
|
||||
dt_periodLog.Rows.Add(dr);
|
||||
}
|
||||
}
|
||||
contador = 4;
|
||||
|
||||
DtAsistencia.Columns.Add("Código", System.Type.GetType("System.String"));
|
||||
DtAsistencia.Columns.Add("Nombre", System.Type.GetType("System.String"));
|
||||
|
||||
foreach (var item in listafecha)
|
||||
{
|
||||
DtAsistencia.Columns.Add(item, System.Type.GetType("System.String"));
|
||||
|
||||
|
||||
}
|
||||
contador = 5;
|
||||
dt_periodLog = dt_periodLog.DefaultView.ToTable(true, "NOEMPLEADO", "FECHA", "HORA");
|
||||
foreach (var user in ListEmpleados)
|
||||
{
|
||||
DataRow dr = DtAsistencia.NewRow();
|
||||
dr["Código"] = user[0];
|
||||
dr["Nombre"] = user[1];
|
||||
double numero = 0;
|
||||
string colname, oldcolname;
|
||||
oldcolname = "";
|
||||
if (user[0].Trim().Length > 0)
|
||||
{
|
||||
|
||||
foreach (DataRow item in dt_periodLog.Select($"NOEMPLEADO = '{user[0]}'"))
|
||||
{
|
||||
colname = item["FECHA"].ToString();
|
||||
if (colname != oldcolname) { numero = 0; }
|
||||
dr[colname] = $"{dr[colname]}{(numero == 0 ? "" : ((numero % 2) == 0) ? "\r\n" : " - ")}{item["HORA"]}";
|
||||
numero = numero + 1;
|
||||
oldcolname = colname;
|
||||
}
|
||||
}
|
||||
DtAsistencia.Rows.Add(dr);
|
||||
}
|
||||
contador = 6;
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"({contador})Error al conectarse al checador " + ex.Message.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (conectado) { conectarse.EnableDevice(idwMachin, true); conectarse.Disconnect(); }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
MessageBox.Show("la fecha inicio no puede ser mayor a la fecha fin ");
|
||||
}
|
||||
DTGVReporte.DataSource = DtAsistencia;
|
||||
DTGVReporte.Refresh();
|
||||
}
|
||||
private DataTable GetEmpleados(zkemkeeper.CZKEM conectarse, int iMachineNumber = 1)
|
||||
{
|
||||
DataTable dtEmpleados = new DataTable();
|
||||
int idwErrorCode = 0;
|
||||
try
|
||||
{
|
||||
dtEmpleados.Columns.Add("NOEMPLEADO");
|
||||
dtEmpleados.Columns.Add("NOMBRE");
|
||||
dtEmpleados.Columns.Add("ACTIVO");
|
||||
|
||||
string sEnrollNumber = "";
|
||||
string sName = "";
|
||||
string sPassword = "";
|
||||
int iPrivilege = 0;
|
||||
bool bEnabled = false;
|
||||
int num = 0;
|
||||
int index = 0;
|
||||
|
||||
bool readallinfo = conectarse.ReadAllUserID(iMachineNumber); // ;//read all the user information To the memory
|
||||
if (readallinfo)
|
||||
{
|
||||
while (conectarse.SSR_GetAllUserInfo(iMachineNumber, out sEnrollNumber, out sName, out sPassword, out iPrivilege, out bEnabled))
|
||||
{
|
||||
|
||||
// If conectarse.GetUserFaceStr(1, sEnrollNumber, iFaceIndex, sTmpData, iLength) Then
|
||||
|
||||
DataRow Renglon = dtEmpleados.NewRow();
|
||||
Renglon["NOEMPLEADO"] = sEnrollNumber;
|
||||
Renglon["NOMBRE"] = sName;
|
||||
Renglon["ACTIVO"] = (bEnabled ? 1 : 0);
|
||||
dtEmpleados.Rows.Add(Renglon);
|
||||
// While conectarse.GetUserTmp(iMachineNumber, sEnrollNumber, dwFingerIndex, TmpData, TmpLength)
|
||||
// entre = True
|
||||
// End While
|
||||
// lvUserInfo.Items(index).SubItems.Add(sName)
|
||||
// lvUserInfo.Items(index).SubItems.Add(sPassword)
|
||||
// lvUserInfo.Items(index).SubItems.Add(iPrivilege.ToString())
|
||||
// lvUserInfo.Items(index).SubItems.Add(iLength.ToString())
|
||||
// lvUserInfo.Items(index).SubItems.Add(sTmpData)
|
||||
index += 1;
|
||||
num += 1;
|
||||
}
|
||||
}
|
||||
else { conectarse.GetLastError(idwErrorCode); }
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Error al conectarse al checador " + ex.Message.ToString());
|
||||
}
|
||||
return dtEmpleados;
|
||||
}
|
||||
|
||||
private void DdlChecadores_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int IDCHECADOR = DdlChecadores.SelectedValue.ToString().ToEntero();
|
||||
DataTable dt = new DataTable();
|
||||
ClsBD chk = new ClsBD();
|
||||
string sqlEjecuta = $"SELECT IPCHECADOR,PUERTO FROM CHECADORES WHERE IDCHECADOR={IDCHECADOR};";
|
||||
dt = chk.EjecutaSqlDT(sqlEjecuta);
|
||||
chk.Desconectar();
|
||||
TxtSelectIP.Text = "";
|
||||
TxtSelecPuerto.Text = "";
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
TxtSelectIP.Text = dt.Rows[0]["IPCHECADOR"].ToString();
|
||||
TxtSelecPuerto.Text = dt.Rows[0]["PUERTO"].ToString();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void BtnDescargar_Click(object sender, EventArgs e)
|
||||
{
|
||||
var wb = new ClosedXML.Excel.XLWorkbook();
|
||||
// Add a DataTable as a worksheet
|
||||
var wsDep = wb.Worksheets.Add(DtAsistencia);
|
||||
wsDep.Columns().AdjustToContents();
|
||||
//System.IO.Stream myStream = null;
|
||||
//wb.SaveAs(myStream);
|
||||
|
||||
//wb.SaveAs("AddingDataTableAsWorksheet.xlsx");
|
||||
SaveFileDialog SaveFileDialog1 = new SaveFileDialog();
|
||||
savefileAs(wb, "Asistencia.xlsx", SaveFileDialog1);
|
||||
}
|
||||
private void savefileAs(ClosedXML.Excel.XLWorkbook wb, string FileName, SaveFileDialog SaveFileDialog1)
|
||||
{
|
||||
|
||||
// Set the properties on SaveFileDialog1 so the user is
|
||||
// prompted to create the file if it doesn't exist
|
||||
// or overwrite the file if it does exist.
|
||||
SaveFileDialog1.CreatePrompt = true;
|
||||
SaveFileDialog1.OverwritePrompt = true;
|
||||
|
||||
// Set the file name to myText.txt, set the type filter
|
||||
// to text files, and set the initial directory to the
|
||||
// MyDocuments folder.
|
||||
SaveFileDialog1.FileName = FileName;
|
||||
// DefaultExt is only used when "All files" is selected from
|
||||
// the filter box and no extension is specified by the user.
|
||||
SaveFileDialog1.DefaultExt = "xlsx";
|
||||
SaveFileDialog1.Filter =
|
||||
"Excel (*.xlsx)|*.txt|All files (*.*)|*.*";
|
||||
SaveFileDialog1.InitialDirectory =
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
|
||||
// Call ShowDialog and check for a return value of DialogResult.OK,
|
||||
// which indicates that the file was saved.
|
||||
DialogResult result = SaveFileDialog1.ShowDialog();
|
||||
System.IO.Stream fileStream;
|
||||
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
// Open the file, copy the contents of memoryStream to fileStream,
|
||||
// and close fileStream. Set the memoryStream.Position value to 0
|
||||
// to copy the entire stream.
|
||||
fileStream = SaveFileDialog1.OpenFile();
|
||||
wb.SaveAs(fileStream);
|
||||
/*myStream.Position = 0;
|
||||
myStream.WriteTo(fileStream);*/
|
||||
fileStream.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user