コード例 #1
0
        private void pbxFotoSocio_Click(object sender, EventArgs e)
        {
            //Solicitar ingreso de dni
            string numdni = Microsoft.VisualBasic.Interaction.InputBox(
                "Ingrese su nuúmero de DNI",
                "Validación de acceso",
                "Ingrese DNI");

            //Busco persona en base de datos
            if (numdni.Length > 0)
            {
                this._asistencia = new ClassAsistencias();

                this._emp = new DataSet();

                this._emp = this._asistencia.BuscarPersonaAsistencia(numdni, "Login");

                if (this._emp.Tables["Login"].Rows.Count > 0)
                {
                    //Se utiliza para el tiempo de duración del logín
                    this.bandera = true;
                    this.contado = 0;

                    //Informo de la persona ingresada mostrando su foto, fecha y hora de ingreso, apellido y nombre por un tiempo de 1 minuto
                    this._asistencia.idasistencia = "0";

                    this._asistencia.idpersona = this._emp.Tables["Login"].Rows[0][0].ToString();
                    this._asistencia.punto     = this._punto;

                    this.lblApeNomb.Text = this._emp.Tables["Login"].Rows[0][1].ToString();

                    this.lblTipoPerPunto.Text = this._emp.Tables["Login"].Rows[0][2].ToString() + " - " + this._punto;

                    this.lblAptoMedico.Text = VencidoActoMedico(this._emp.Tables["Login"].Rows[0][3].ToString());

                    this.lblFechaHoraAcceso.Text = this.lblFechaHora.Text;

                    this._asistencia.ingreso = DateTime.Parse(this.lblFechaHoraAcceso.Text).ToString("yyyy/MM/dd hh:mm:ss");

                    this._asistencia.salida = DateTime.Parse(this.lblFechaHoraAcceso.Text).ToString("yyyy/MM/dd hh:mm:ss");

                    this._asistencia.accion           = "I";
                    this._asistencia.fechaaccion      = DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss");
                    this._asistencia.idempleadoaccion = 1; //Viene del login
                    this._asistencia.idpuntoaccion    = 1; //Viene del login

                    //Registro asistencia en base de datos
                    this._asistencia.ABMAsistencia(this._asistencia, "ingreso");
                }
                else
                {
                    MessageBox.Show("Los datos no se corresponde con ningún socio!!!");
                }
            }
        }
コード例 #2
0
 private void Asistencias_Load(object sender, EventArgs e)
 {
     this._asistencia = new ClassAsistencias();
     this.reloj.Start();
 }