Пример #1
0
        void navBarControl1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {        
            switch(e.Link.Group.Name)
            {
                case "navBarInicio":
                    CloseForms();
                    frmPortada Portada = new frmPortada();
                    Portada.TopLevel = false;
                    Portada.Parent = this.splitContainerControl1.Panel2;
                    Portada.Dock = DockStyle.Fill;
                    //Portada.Enabled = false;
                    Portada.ControlBox = false;
                    Portada.Show();
                    break;
                case "navBarReportes":
                    switch (e.Link.Caption)
                    {
                        case "Grupos":                            
                            frmParametersGroups Parameters = new frmParametersGroups();
                            Parameters.ShowDialog();
                            break;
                        case "Maestros":
                            //frmReportGeneral ReportGeneral = new frmReportGeneral();
                            //ReportGeneral.ShowDialog();
                            break;
                        case "General":
                            frmReportGeneral ReportGeneral = new frmReportGeneral();
                            ReportGeneral.ShowDialog();
                            break;
                    }
                    break;

                case "navBarHorarios":
                    frmHorario Horario = new frmHorario();
                    switch (e.Link.Caption)
                    {
                        case "Grupos":
                            CloseForms();
                            Horario.TopLevel = false;
                            Horario.Parent = this.splitContainerControl1.Panel2;
                            Horario.Dock = DockStyle.Fill;
                            Horario.ControlBox = false;
                            if (Horario.InicializeSchedule("Grupo"))
                            { Horario.Show(); }
                            else
                            {
                                frmPortada Portada1 = new frmPortada();
                                Portada1.TopLevel = false;
                                Portada1.Parent = this.splitContainerControl1.Panel2;
                                Portada1.Dock = DockStyle.Fill;
                                Portada1.Enabled = false;
                                Portada1.ControlBox = false;
                                Portada1.Show();
                            }                
                            break;
                        case "Maestros":
                            CloseForms();
                            Horario.TopLevel = false;
                            Horario.Parent = this.splitContainerControl1.Panel2;
                            Horario.Dock = DockStyle.Fill;
                            Horario.ControlBox = false;
                            if (Horario.InicializeSchedule("Maestro"))
                            { Horario.Show(); }
                            else
                            {
                                frmPortada Portada2 = new frmPortada();
                                Portada2.TopLevel = false;
                                Portada2.Parent = this.splitContainerControl1.Panel2;
                                Portada2.Dock = DockStyle.Fill;
                                Portada2.Enabled = false;
                                Portada2.ControlBox = false;
                                Portada2.Show();
                            }    
                            break;                    
                    }
                    break;
                
                case "navBarAltas":
                    CloseForms();
                    frmCaptura Captura = new frmCaptura();
                    switch (e.Link.Caption)
                    {
                            
                        case "Especialidad":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.Show();
                            break;
                        case "Grupos":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.Show();
                            break;
                        case "Materias":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.Show();
                            break;
                        case "Personal":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.TabPageToFront();
                            Captura.Show();
                            break;
                        case "Asignar Materias":
                            Captura.TopLevel = false;
                            Captura.Parent = this.splitContainerControl1.Panel2;
                            Captura.Dock = DockStyle.Fill;
                            Captura.ControlBox = false;
                            Captura.TabPageToFront();
                            Captura.Show();
                            break;
                    }
                    break;         
            }
        }
Пример #2
0
 private void bBtnRGeneral_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     frmReportGeneral ReportGeneral = new frmReportGeneral();
     ReportGeneral.ShowDialog();
 }