Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            int LinhaSelecionada = dgvListaPeca.CurrentRow.Index;

            if (dgvListaPeca.CurrentRow == null)
            {
                MessageBox.Show("Não tem nenhuma peça selecionada");
            }


            Peca peca = Program.pecas[LinhaSelecionada];

            new CadastroPeca(peca, LinhaSelecionada).ShowDialog();

            CadastroPeca cadastropeca = new CadastroPeca(peca, LinhaSelecionada);
        }
Example #2
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            CadastroPeca cadastroPeca = new CadastroPeca();

            cadastroPeca.ShowDialog();
        }