Beispiel #1
0
        private void faturasToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form frmCliente = this.MdiChildren.FirstOrDefault(i => i is FrmBDNotaFiscal);

            frmCliente = new FrmBDNotaFiscal() { MdiParent = this }; // test
            frmCliente.Focus();
        }
Beispiel #2
0
        private void faturasToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                Form frmCliente = this.MdiChildren.FirstOrDefault(i => i is FrmBDNotaFiscal);

                if (frmCliente == null)
                {
                    frmCliente = new FrmBDNotaFiscal() { MdiParent = this };
                }
                frmCliente.Focus();
            }
            catch (Exception)
            {
                MessageBox.Show("Falha na aplicação!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }