private void btnAlterar_Click(object sender, EventArgs e)
        {
            try
            {
                var form = Support.BuscaForm <frmCadastroCategoria>();  //  Program.Container.GetInstance<frmCadastroContaContabil>();
                if (form.Created)
                {
                    var conf = MessageBox.Show("A Categoria aberta será fechada, deseja continuar?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (conf == DialogResult.Yes)
                    {
                        form.Dispose();
                        btnAlterar_Click(sender, e);
                        return;
                    }
                    form.BringToFront();
                    return;
                }

                var frmcadastro = Program.Container.GetInstance <frmCadastroCategoria>();
                frmcadastro.FormClosed += (s, args) => this.btnPesquisar_Click(sender, e);
                CarregaCadastro(frmcadastro, ModoAcesso.Alteracao);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.GetBaseException().Message);
            }
        }
Exemple #2
0
        private void consultarLogToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = Support.BuscaForm <frmConsultaLog>();  //  Program.Container.GetInstance<frmCadastroContaContabil>();

            if (!form.Created)
            {
                form.MdiParent = this;
                form.Show();
                return;
            }
            form.BringToFront();
            return;
        }
Exemple #3
0
        private void sobreToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = Support.BuscaForm <frmSobre>();

            if (!form.Created)
            {
                form.MdiParent = this;
                form.Show();
                return;
            }
            form.BringToFront();
            return;
        }
Exemple #4
0
        private void inserirCategoriaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = Support.BuscaForm <frmAlteraMDBs>();

            if (!form.Created)
            {
                form.MdiParent = this;
                form.Show();
                return;
            }
            form.BringToFront();
            return;
        }