示例#1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            try
            {
                // Se procede habilitar los campos de textos
                this.Habilitar();
                this.Limpiar();

                // Se procede habilitar los Botones Basicos
                // Los Campos de Textos y Botones de Examinar

                this.btnNuevo.Enabled    = false;
                this.btnGuardar.Enabled  = true;
                this.btnEliminar.Enabled = false;
                this.btnEditar.Enabled   = false;

                // Se hace enfasis (Focus) Al Iniciar el Evento Click
                // sobre el Campo Con Nombre Proveedor

                this.TBEquipo.Focus();
                this.IsNuevo = true;

                //Se capturan los valores del computador donde esta iniciado
                this.TBDiscoDuro.Text    = Informacion_Computer.Serial_HDD();
                this.TBMacseguridad.Text = Informacion_Computer.MAC_Address();
                this.TBEquipo.Text       = Informacion_Computer.Nombre_PC();

                //this.TBSerialProcesador.Text = Informacion_Computer.Serial_Procesador();
                //this.TBCodigoDeSeguridad.Text = Informacion_Computer.SO_Informacion();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
 private void Seguridad_SQL()
 {
     try
     {
         //Se capturan los valores del computador donde esta iniciado
         this.HDD_SQL          = Informacion_Computer.Serial_HDD();
         this.MacSeguridad_SQL = Informacion_Computer.MAC_Address();
         this.Equipo_SQL       = Informacion_Computer.Nombre_PC();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + ex.StackTrace);
     }
 }