Пример #1
0
        private void btnIncluir_Click(object sender, EventArgs e)
        {
            frmFormaPagamento frmFormaPagamento = new frmFormaPagamento();

            frmFormaPagamento.ShowDialog();
            //ExibirProdutos();
            criaDataGrid();
        }
Пример #2
0
        private void dgvFormasPagamento_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int index = e.RowIndex;

            //Se for diferente do cabeçalho
            if (index != -1)
            {
                DataGridViewRow selectedRow = dgvFormasPagamento.Rows[index];

                string id = selectedRow.Cells[0].Value.ToString();

                //Abre a tela em processo de edição
                frmFormaPagamento frmFormaPagamento = new frmFormaPagamento();
                frmFormaPagamento.idFormaPagamento = Convert.ToInt32(id);
                frmFormaPagamento.ShowDialog();

                //Remonta o grid apos o process de edição ou exclusao.
                //ExibirProdutos();
                criaDataGrid();
            }
        }