Universe.Modules.Web.GridPage.RemovePage C# (CSharp) Method

RemovePage() public method

public RemovePage ( string MenuID, GridPage replacePage ) : void
MenuID string
replacePage GridPage
return void
        public void RemovePage (string MenuID, GridPage replacePage)
        {
            GridPage foundPage = null;
            foreach (var page in Children) {
                if (page.MenuID == MenuID) {
                    foundPage = page;
                    break;
                }

                if (page.Children.Count > 0) {
                    var p = GetPage (MenuID, page);
                    if (p != null) {
                        page.Children.Remove (p);
                        return;
                    }
                }
            }
            if (foundPage != null)
                Children.Remove (foundPage);
        }