Esempio n. 1
0
 public OperationState StartClearAllAllocation()
 {
     try
     {
         string       functionality = FunctionalitiesCode.LOAD_CLEAR_TABLES_AND_GRIDS;
         Controllable page          = ApplicationManager.ControllerFactory.GetController(functionality);
         if (page != null)
         {
             return(page.Create());
         }
         return(OperationState.CONTINUE);
     }
     catch (Exception)
     {
         return(OperationState.STOP);
     }
 }
Esempio n. 2
0
 public OperationState StartRunAllTransformationTrees()
 {
     try
     {
         string       functionality = FunctionalitiesCode.TRANSFORMATION_TREE_LOAD;
         Controllable page          = ApplicationManager.ControllerFactory.GetController(functionality);
         if (page != null)
         {
             return(page.Create());
         }
         return(OperationState.CONTINUE);
     }
     catch (Exception)
     {
         return(OperationState.STOP);
     }
 }
Esempio n. 3
0
/// <summary>
///
/// </summary>
/// <returns></returns>
        public OperationState UploadMultipleFiles()
        {
            try
            {
                string       functionality = FunctionalitiesCode.MULTIPLE_FILES_UPLOAD;
                Controllable page          = ApplicationManager.ControllerFactory.GetController(functionality);
                if (page != null)
                {
                    return(page.Create());
                }
                return(OperationState.CONTINUE);
            }
            catch (Exception)
            {
                return(OperationState.STOP);
            }
        }
Esempio n. 4
0
 public OperationState  StartAllocationLog()
 {
     try
     {
         string       functionality = FunctionalitiesCode.LOAD_LOG;
         Controllable page          = ApplicationManager.ControllerFactory.GetController(functionality);
         if (page != null)
         {
             return(page.Create());
         }
         return(OperationState.CONTINUE);
     }
     catch (Exception)
     {
         return(OperationState.STOP);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// To clear or run multiple transformationTrees
 /// </summary>
 /// <param name="forClear">forClear = false means it's the run mode
 ///  forClear = true means it's the clear mode</param>
 /// <returns></returns>
 public OperationState LoadTransformationTrees(bool forClear = false)
 {
     try
     {
         string functionality = forClear ? FunctionalitiesCode.TRANSFORMATION_TREE_CLEAR :
                                FunctionalitiesCode.TRANSFORMATION_TREE_LOAD;
         Controllable page = ApplicationManager.ControllerFactory.GetController(functionality);
         if (page != null)
         {
             return(page.Create());
         }
         return(OperationState.CONTINUE);
     }
     catch (Exception)
     {
         return(OperationState.STOP);
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Open a Edition view for a fonctionality
        /// This method shall be called by the PageManager
        /// </summary>
        /// <param name="token">NavigationToken</param>
        protected OperationState openEditionPage(NavigationToken token)
        {
            Controllable page = null;

            try
            {
                String functionality = token.Functionality;

                if (functionality == FunctionalitiesCode.FILE_SAVE)
                {
                    return(saveFile(token));
                }

                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);
                EditionMode editionMode = token.EditionMode;
                object      oid         = token.ItemId;
                if (editionMode == EditionMode.CREATE)
                {
                    page.Create();
                }
                else if (editionMode == EditionMode.READ_ONLY)
                {
                    if (token.ItemIds.Count == 0)
                    {
                        page.Open(oid);
                    }

                    foreach (object id in token.ItemIds)
                    {
                        if (id != null)
                        {
                            page.Open(id);
                        }
                    }
                }
                else if (editionMode == EditionMode.MODIFY)
                {
                    if (token.ItemIds.Count == 0)
                    {
                        page.Edit(oid);
                    }
                    foreach (object id in token.ItemIds)
                    {
                        if (id != null)
                        {
                            page.Edit(id);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                InternalErrorMessage = ex.Message;
                OnClosePage(page);
            }
            return(OperationState.CONTINUE);
        }