Пример #1
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            frmEnvelope frm = new frmEnvelope(CRUD.cadastrar, null, codigo, idPermissao);

            if (frm.ShowDialog() == DialogResult.Yes)
            {
                AtualizarGrid();
            }
        }
Пример #2
0
        private void cadastrarEnvelopeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form mdiChildForm in MdiChildren)
            {
                mdiChildForm.Close();
            }
            frmEnvelope mspforma = new frmEnvelope(CRUD.cadastrar, usuario.Codigo, usuario.idPermissao);

            mspforma.MdiParent = this;
            mspforma.Show();
            mspforma.WindowState = FormWindowState.Maximized;
        }
Пример #3
0
        private void btnAlterar_Click(object sender, EventArgs e)
        {
            if (dgvBaixa.SelectedRows.Count == 0)
            {
                MessageBox.Show("Nenhum envelope selecionado.");
                return;
            }
            EnvelopeDTO envelopeSelecionado = (dgvBaixa.SelectedRows[0].DataBoundItem as EnvelopeDTO);

            envelopeSelecionado.Baixa = true;
            frmEnvelope frmEnvelope = new frmEnvelope(CRUD.alterar, envelopeSelecionado, 0);

            if (frmEnvelope.ShowDialog() == DialogResult.Yes)
            {
                AtualizarGrid();
            }
            //env.Alterar(envelopeSelecionado);
        }