Exemplo n.º 1
0
        private void btSalir_Click(object sender, EventArgs e)
        {
            if (Cargado == true)
            {
                DialogResult Res = new DialogResult();
                Res = MessageBox.Show("¿Agregar equipo seleccionado?", "¡Atención!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (Res == DialogResult.Yes)
                {
                    String Query = NuevaLinea();

                    try
                    {
                        using (MySqlConnection sqlConnection = new MySqlConnection(strConnection))
                        {
                            MySqlCommand sqlCmd = new MySqlCommand(Query, sqlConnection);
                            sqlConnection.Open();
                            sqlCmd.ExecuteNonQuery();
                            sqlConnection.Close();
                        }
                    }
                    catch (Exception exc) { MessageBox.Show(exc.Message); }

                    fBalanceCargas aux = (fBalanceCargas)this.Owner;
                    aux.RecargarEscenario();
                }
            }

            Close();
        }
Exemplo n.º 2
0
        private void btSalir_Click(object sender, EventArgs e)
        {
            fBalanceCargas aux = (fBalanceCargas)this.Owner;

            aux.RecargarEscenario();
            Close();
        }
Exemplo n.º 3
0
 private void btCargas_Click(object sender, EventArgs e)
 {
     if (cbUsuario.Text == " -- Seleccionar Usuario -- " || cbProyecto.Text == " -- Seleccionar Proyecto -- ")
     {
         MessageBox.Show("Seleccione un Usuario y un Proyecto");
     }
     else
     {
         fBalanceCargas frm = new fBalanceCargas(cbUsuario.Text, cbProyecto.Text);
         frm.Owner = this;
         frm.ShowDialog();
         //this.Close();
     }
 }
Exemplo n.º 4
0
        private void btAgregar_Click(object sender, EventArgs e)
        {
            String Query = NuevaLinea();

            try
            {
                using (MySqlConnection sqlConnection = new MySqlConnection(strConnection))
                {
                    MySqlCommand sqlCmd = new MySqlCommand(Query, sqlConnection);
                    sqlConnection.Open();
                    sqlCmd.ExecuteNonQuery();
                    sqlConnection.Close();
                }
            }
            catch (Exception exc) { MessageBox.Show(exc.Message); }

            fBalanceCargas aux = (fBalanceCargas)this.Owner;

            aux.RecargarEscenario();
            Cargado = false;
            cbEquipos.Focus();
        }