Ejemplo n.º 1
0
        /// <summary>
        /// Open the Search view for a functionality in creation mode
        /// </summary>
        /// <param name="token">NavigationToken</param>
        protected OperationState openSearchPage(NavigationToken token)
        {
            String       functionality = token.Functionality;
            Controllable page          = searchInOpenedPages(functionality);

            if (page == null)
            {
                page = ApplicationManager.ControllerFactory.GetController(functionality, token.ViewType, token.EditionMode);
                if (page == null)
                {
                    return(openHomePage());
                }
                OpenedPages.Add(page);
                page.NavigationToken = token;
                page.Initialize();
            }
            openPage(page);
            page.Search();

            if (token.ItemId != null)
            {
                int idmodel = int.Parse(token.ItemId.ToString());
                page.Search(idmodel);
            }
            return(OperationState.CONTINUE);
        }