Beispiel #1
0
 public Empleado(DateTime fechaIngreso, string telefono, DateTime fechaNacimiento, string nombre, string apellido, string password, TipoEmpleado tipo, DateTime ultimoLogin, bool activo)
 {
     this.fechaIngreso    = fechaIngreso;
     this.telefono        = telefono;
     this.fechaNacimiento = fechaNacimiento;
     this.nombre          = nombre;
     this.apellido        = apellido;
     this.password        = Helper.sha256(password);
     this.tipo            = tipo;
     this.ultimoLogin     = ultimoLogin;
     this.activo          = activo;
 }
Beispiel #2
0
        private void readAttrs()
        {
            DataTable values = BDHelper.ConsultaSQL("SELECT fechaIngreso, telefono, fechaNacimiento, nombre, apellido, password, tipo, ultimoLogin, activo FROM USUARIO WHERE legajo = " + legajo);

            fechaIngreso    = DateTime.Parse(values.Rows[0]["fechaIngreso"].ToString());
            telefono        = values.Rows[0]["telefono"].ToString();
            fechaNacimiento = DateTime.Parse(values.Rows[0]["fechaNacimiento"].ToString());
            nombre          = values.Rows[0]["nombre"].ToString();
            apellido        = values.Rows[0]["apellido"].ToString();
            password        = values.Rows[0]["password"].ToString();
            tipo            = new TipoEmpleado((int)values.Rows[0]["tipo"]);
            ultimoLogin     = DateTime.Parse(values.Rows[0]["ultimoLogin"].ToString());
            activo          = (bool)values.Rows[0]["activo"];
        }