Example #1
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            CadastroServico tela = new CadastroServico();

            tela.FormClosed += Tela_FormClosed;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }
Example #2
0
        private void btAlterar_Click(object sender, EventArgs e)
        {
            if (dgServico.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selecione um serviço");
                return;
            }

            long            servicoId = (long)dgServico.SelectedRows[0].Cells[0].Value;
            CadastroServico tela      = new CadastroServico();

            tela.FormClosed += Tela_FormClosed;
            tela.ServicoId   = servicoId;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }