protected void Application_Error(object sender, EventArgs e) { var lastExc = Server.GetLastError(); var errcode = Dbl.AddLog(lastExc); var url = string.Format("{0}?errcode={1}", SynNavigation.Pages.ErrorPage, errcode); SynNavigation.Goto(url); }
protected override void OnInit(EventArgs e) { base.OnInit(e); Page.PreRender += new EventHandler(PagePreRender); if (!LoginProvider && CurrentUser == null) { SynNavigation.Goto(Pages.Login); } if (!IsPostBack) { if (RequiredPermissions.NotEmpty()) { Title = GenericFormatter.GetEnumDescription(RequiredPermissions[0]); } else { Title = "מסך הבית"; } if (!LoginProvider) { BuildSiteMapLinks(); bool navSelected = false; if (RequiredPermissions.NotEmpty()) { var requiredPermis = RequiredPermissions.FirstOrDefault(); PageLinkAttribute HasNavLink = GetPageLink(requiredPermis); if (HasNavLink != null) { ((HtmlAnchor)Master.FindControl(HasNavLink.NavLink)).Attributes.Add("class", "active"); navSelected = true; } } if (!navSelected) { ((HtmlAnchor)Master.FindControl(DefaultNavItem)).Attributes.Add("class", "active"); } (Master as WebSimplify.WebSimplify).CurrentUserName = CurrentUser.DisplayName ?? CurrentUser.UserName; (Master as WebSimplify.WebSimplify).IsAdmin = CurrentUser.IsAdmin; } foreach (ClientPagePermissions en in RequiredPermissions) { if (!CurrentUser.Allowed(en)) { SynNavigation.Goto(Pages.Main); } } } }
protected void Application_Error(object sender, EventArgs e) { try { var lastExc = Server.GetLastError(); var errcode = Dbl.AddLog(lastExc); StoreEx(lastExc); } catch (Exception ex) { StoreEx(ex); } SynNavigation.Goto(Pages.ErrorPage); }
public static void Navigate(string destinationpage) { string url = string.Empty; SynNavigation.Goto(url); }
private void Nav(string i_page) { SynNavigation.Goto(i_page); }