Beispiel #1
0
        private void btnReportes_Click(object sender, EventArgs e)
        {
            this.Close();
            Reportes frmreportes = new Reportes();

            frmreportes.Show();
        }
Beispiel #2
0
 private void btnReportes_Click(object sender, EventArgs e)
 {
     if (Globales.ventana != 4)
     {
         if (MessageBox.Show("Abrir ventana? Se perderán los cambios que no hayan sigo guardados", "Advertencia", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)
         {
             var      form = Application.OpenForms.OfType <Reportes>().FirstOrDefault();
             Reportes hijo = form ?? new Reportes();
             Globales.ventana       = 4;
             Index.ActiveForm.Width = Globales.tamañoInicial;
             Contenedor.Width       = Globales.ContIndexInicial;
             AddFormInPanel(hijo);
         }
     }
 }