private void btnAceptar_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrWhiteSpace(txtSerie.Text))
     {
         if (SqlValidacion.Existe("SELECT id_serial FROM serialesdisponibles WHERE serial = '" + txtSerie.Text + "'"))
         {
             SqlValidacion.InsertarDatos("DELETE FROM serialesdisponibles WHERE serial = '" + txtSerie.Text + "'");
             NetworkInterface[] nic = NetworkInterface.GetAllNetworkInterfaces();
             string             mac = nic[0].GetPhysicalAddress().ToString();
             SqlValidacion.InsertarDatos("INSERT INTO serialesusados VALUES (NULL,'" + txtSerie.Text + "', '" + mac + "')");
             MessageBox.Show(this, "Gracias por su registro", "Registro de programa", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.Hide();
             frmLogin login = new frmLogin();
             login.Show();
         }
         else
         {
             MessageBox.Show(this, "Serial no valido", "Error de verificación", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show(this, "Debes ingresar un numero de serie", "Número de serie", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 2
0
 private void frmSplash_Load(object sender, EventArgs e)
 {
     SqlValidacion.Load();
     Sql.Load();
 }
Esempio n. 3
0
 private void Cargar()
 {
     Sql.Load();
     SqlValidacion.Load();
 }