Exemplo n.º 1
0
        public static void insertarPruebaADA(MySqlConnection conexion, PruebaADA ipada)
        {
            String query = "INSERT INTO ADA(IDPRUEBA, FECHAINDICACION, FECHARECEPCION, RESULTADOSADA, IDVALOREFERENCIAADA, FECHARESULTADO) VALUES ('" + ipada.idprueba + "','" + ipada.fechaindicacion + "','" + ipada.fecharecepcion + "','" + ipada.resultadosada + "','" + ipada.idvalorreferencia + "','" + ipada.fecharesultado + "',)";

            try
            {
                MySqlCommand comando = new MySqlCommand(query, conexion);
                Int32        lector  = (Int32)comando.ExecuteNonQuery();
            }
            catch (MySqlException ex)
            { throw ex; }
        }
Exemplo n.º 2
0
        private void buttonguardar_Click(object sender, EventArgs e)
        {
            try
            {
                if (con.conectar())
                {
                    Clases.Prueba ip = new Clases.Prueba(Convert.ToInt32(label4), 1);
                    Clases.Prueba.ingresarprueba(con.conexion, ip);
                    Clases.PruebaADA ipada = new Clases.PruebaADA();
                    Clases.PruebaADA.insertarPruebaADA(con.conexion, ipada);

                    MessageBox.Show("Muestra Ingresada Exitosamente");
                }
            }

            catch (MySqlException ex)
            {
                MessageBox.Show("Error al insertar la muestra" + ex);
            }
            con.desconectar();
        }