private void button2_Click(object sender, EventArgs e) { this.Hide(); VentanaLogin log = new VentanaLogin(); log.Show(); }
private void button2_Click_1(object sender, EventArgs e) { DateTime fechaFin = DateTime.Now; string codigo = ""; try { MySqlCommand sql = new MySqlCommand(String.Format("SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='bitacora'"), ConectarServidor.conexion()); MySqlDataReader dr = sql.ExecuteReader(); if (dr.Read() == true) { codigo = dr.GetString(0); } dr.Close(); int cod = int.Parse(codigo) - 1; Console.WriteLine(fechaFin.ToString()); Console.WriteLine(cod); MySqlCommand sql2 = new MySqlCommand(String.Format("pd_ModificarBitacora"), ConectarServidor.conexion()); sql2.CommandType = CommandType.StoredProcedure; sql2.Parameters.AddWithValue("@cod", cod.ToString()); sql2.Parameters.AddWithValue("@fechHoraFinSe", fechaFin); sql2.ExecuteNonQuery(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } ConectarServidor.cerrarConexion(); this.Hide(); VentanaLogin log = new VentanaLogin(); log.Show(); }
private void button2_Click_1(object sender, EventArgs e) { // Application.Exit(); ConectarServidor.cerrarConexion(); this.Hide(); VentanaLogin looge = new VentanaLogin(); looge.Show(); }