Esempio n. 1
0
 private void OnChange(PnlNuevoPrivilegio Privilegio)
 {
     if (Privilege != null)
     {
         Privilege(Privilegio);
     }
 }
Esempio n. 2
0
        private void InicializarPrivilegios()
        {
            if (!ContextControls.ContainsKey("PnlNuevoPrivilegio"))
            {
                PnlNuevoPrivilegio pnlNuevoPrivilegio = new PnlNuevoPrivilegio();
                pnlNuevoPrivilegio.Dock = DockStyle.Fill;
                DevExpress.XtraTab.XtraTabPage tabItem = new DevExpress.XtraTab.XtraTabPage();
                tabItem.Controls.Add(pnlNuevoPrivilegio);
                tabItem.Text = "Lista de Privilegios";
                xtraTabControl.TabPages.Add(tabItem);
                xtraTabControl.SelectedTabPage = tabItem;

                ContextControls.Add("PnlNuevoPrivilegio", pnlNuevoPrivilegio);
            }
        }
Esempio n. 3
0
        private void barButtonAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (!(this.ParentForm as mainForm).ContextControls.ContainsKey("PnlNuevoPrivilegio"))
            {
                PnlNuevoPrivilegio pnlPrivilegios = new PnlNuevoPrivilegio( );
                pnlPrivilegios.Dock       = DockStyle.Fill;
                pnlPrivilegios.Privilege += new PnlNuevoPrivilegio.PrivilegesHandler(pnlPrivilegios_Privilege);
                DevExpress.XtraTab.XtraTabPage tabItem = new DevExpress.XtraTab.XtraTabPage( );
                tabItem.Controls.Add(pnlPrivilegios);
                tabItem.Text = "Crear/Editar Usuarios";
                (this.ParentForm as mainForm).xtraTabControl.TabPages.Add(tabItem);
                (this.ParentForm as mainForm).xtraTabControl.SelectedTabPage = tabItem;

                (this.ParentForm as mainForm).ContextControls.Add("PnlNuevoPrivilegio", pnlPrivilegios);
            }
        }
Esempio n. 4
0
        private void barButtonEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DataRowView selectedRow;

            selectedRow = ( DataRowView )gridViewUsuarios.GetFocusedRow( );

            if (!(this.ParentForm as mainForm).ContextControls.ContainsKey("PnlNuevoPrivilegio"))
            //if (!(this.ParentForm as mainForm).ContextControlsForPrivilegios.ContainsKey(selectedRow.Row.ItemArray[0].ToString()))

            {
                PnlNuevoPrivilegio pnlPrivilegios = new PnlNuevoPrivilegio(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString( ), selectedRow.Row.ItemArray[2].ToString( ),
                                                                           selectedRow.Row.ItemArray[3].ToString( ), selectedRow.Row.ItemArray[4].ToString( ), selectedRow.Row.ItemArray[5].ToString( ), selectedRow.Row.ItemArray[6].ToString( ));
                pnlPrivilegios.Dock       = DockStyle.Fill;
                pnlPrivilegios.Privilege += new PnlNuevoPrivilegio.PrivilegesHandler(pnlPrivilegios_Privilege);
                DevExpress.XtraTab.XtraTabPage tabItem = new DevExpress.XtraTab.XtraTabPage( );
                tabItem.Controls.Add(pnlPrivilegios);
                tabItem.Text = "Crear/Editar Usuarios";
                (this.ParentForm as mainForm).xtraTabControl.TabPages.Add(tabItem);
                (this.ParentForm as mainForm).xtraTabControl.SelectedTabPage = tabItem;
                //(this.ParentForm as mainForm).ContextControlsForPrivilegios.Add(selectedRow.Row.ItemArray[0].ToString(), pnlPrivilegios);
                (this.ParentForm as mainForm).ContextControls.Add("PnlNuevoPrivilegio", pnlPrivilegios);
            }
        }
Esempio n. 5
0
        private void InicializarPrivilegios()
        {
            if (!ContextControls.ContainsKey("PnlNuevoPrivilegio"))
            {
                PnlNuevoPrivilegio pnlNuevoPrivilegio = new PnlNuevoPrivilegio();
                pnlNuevoPrivilegio.Dock = DockStyle.Fill;
                DevExpress.XtraTab.XtraTabPage tabItem = new DevExpress.XtraTab.XtraTabPage();
                tabItem.Controls.Add(pnlNuevoPrivilegio);
                tabItem.Text = "Lista de Privilegios";
                xtraTabControl.TabPages.Add(tabItem);
                xtraTabControl.SelectedTabPage = tabItem;

                ContextControls.Add("PnlNuevoPrivilegio", pnlNuevoPrivilegio);
            } 
        }
Esempio n. 6
0
 private void OnChange( PnlNuevoPrivilegio Privilegio )
 {
     if ( Privilege != null )
     {
         Privilege( Privilegio );
     }
 }
Esempio n. 7
0
 private void pnlPrivilegios_Privilege(PnlNuevoPrivilegio Privilegio)
 {
     InitializeGrid( );
 }
Esempio n. 8
0
        private void barButtonAdd_ItemClick( object sender , DevExpress.XtraBars.ItemClickEventArgs e )
        {
            if ( !( this.ParentForm as mainForm ).ContextControls.ContainsKey( "PnlNuevoPrivilegio" ) )
            {
                PnlNuevoPrivilegio pnlPrivilegios = new PnlNuevoPrivilegio( );
                pnlPrivilegios.Dock = DockStyle.Fill;
                pnlPrivilegios.Privilege += new PnlNuevoPrivilegio.PrivilegesHandler( pnlPrivilegios_Privilege );
                DevExpress.XtraTab.XtraTabPage tabItem = new DevExpress.XtraTab.XtraTabPage( );
                tabItem.Controls.Add( pnlPrivilegios );
                tabItem.Text = "Crear/Editar Usuarios";
                ( this.ParentForm as mainForm ).xtraTabControl.TabPages.Add( tabItem );
                ( this.ParentForm as mainForm ).xtraTabControl.SelectedTabPage = tabItem;

                ( this.ParentForm as mainForm ).ContextControls.Add( "PnlNuevoPrivilegio" , pnlPrivilegios );
            }
        }
Esempio n. 9
0
 private void pnlPrivilegios_Privilege( PnlNuevoPrivilegio Privilegio )
 {
     InitializeGrid( );
 }
Esempio n. 10
0
        private void barButtonEdit_ItemClick( object sender , DevExpress.XtraBars.ItemClickEventArgs e )
        {
            DataRowView selectedRow;
            selectedRow = ( DataRowView ) gridViewUsuarios.GetFocusedRow( );
            
            if ( !( this.ParentForm as mainForm ).ContextControls.ContainsKey( "PnlNuevoPrivilegio" ) )
            //if (!(this.ParentForm as mainForm).ContextControlsForPrivilegios.ContainsKey(selectedRow.Row.ItemArray[0].ToString()))

            {
                PnlNuevoPrivilegio pnlPrivilegios = new PnlNuevoPrivilegio( selectedRow.Row.ItemArray[0].ToString(),selectedRow.Row.ItemArray[ 1 ].ToString( ) , selectedRow.Row.ItemArray[ 2 ].ToString( ),
                    selectedRow.Row.ItemArray[ 3 ].ToString( ) , selectedRow.Row.ItemArray[ 4 ].ToString( ) , selectedRow.Row.ItemArray[ 5 ].ToString( ) , selectedRow.Row.ItemArray[ 6 ].ToString( ) );
                pnlPrivilegios.Dock = DockStyle.Fill;
                pnlPrivilegios.Privilege += new PnlNuevoPrivilegio.PrivilegesHandler( pnlPrivilegios_Privilege );
                DevExpress.XtraTab.XtraTabPage tabItem = new DevExpress.XtraTab.XtraTabPage( );
                tabItem.Controls.Add( pnlPrivilegios );
                tabItem.Text = "Crear/Editar Usuarios";
                ( this.ParentForm as mainForm ).xtraTabControl.TabPages.Add( tabItem );
                ( this.ParentForm as mainForm ).xtraTabControl.SelectedTabPage = tabItem;
                //(this.ParentForm as mainForm).ContextControlsForPrivilegios.Add(selectedRow.Row.ItemArray[0].ToString(), pnlPrivilegios);
                ( this.ParentForm as mainForm ).ContextControls.Add( "PnlNuevoPrivilegio" , pnlPrivilegios );
            }
        }