예제 #1
0
파일: frmAdmin.cs 프로젝트: gpanayir/sffwk
        private void navBarControl1_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            try
            {
                currontSecurityControlBase = ControlsFactory.Show(e.Link, this.panelControl1);
                //Esto se hace de esta manera ya que el tree listo no se carga correctamente la  primera vez que se levanta el control
                if (currontSecurityControlBase.GetType() == typeof(RulesEditControl))
                    ((RulesEditControl)currontSecurityControlBase).PopulateAsync();
            }
            catch (Exception ex)
            {
                base.MessageViewInfo.Show(Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex));
            }


        }
예제 #2
0
        internal static SecurityControlBase Show(NavBarItemLink pItem, Control pContainer)
        {
            SecurityControlBase wSecurityControl = Get(pItem);

            AddtoPanel(wSecurityControl, pContainer);
            try
            {
                wSecurityControl.Initialize();
            }
            catch (Exception ex)
            {
                pContainer.Controls.Clear();
                throw ex;
            }


            return(wSecurityControl);
        }