コード例 #1
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int id = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);

            ComestivelRepository repository = new ComestivelRepository();
            Comestivel           comestivel = repository.ObterPeloID(id);

            CadastroComestiveis cadastroComestiveis = new CadastroComestiveis(comestivel);

            cadastroComestiveis.ShowDialog();
        }
コード例 #2
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            CadastroComestiveis cadastro = new CadastroComestiveis();

            cadastro.ShowDialog();
        }