Ejemplo n.º 1
0
        public override void RefreshTreeFolder(Type itemType, string path)
        {
            try
            {
                if (System.Windows.MessageBox.Show("Un saved items changes under the refreshed folder will be lost, to continue with refresh?", "Refresh Folder", System.Windows.MessageBoxButton.YesNo, System.Windows.MessageBoxImage.Warning, System.Windows.MessageBoxResult.No) == System.Windows.MessageBoxResult.Yes)
                {
                    mBulkOperationIsInProcess = true;
                    //refresh cache
                    RepositoryFolderBase repoFolder = (RepositoryFolderBase)(((ITreeViewItem)this).NodeObject());
                    repoFolder.ReloadItems(); // .RefreshFolderCache();

                    //refresh tree
                    mTreeView.Tree.RefresTreeNodeChildrens((ITreeViewItem)this);

                    mBulkOperationIsInProcess = false;
                }
            }
            catch (Exception ex)
            {
                //TODO: Fix with New Reporter (on GingerWPF)
                System.Windows.MessageBox.Show(String.Format("Failed to refresh the item type cache for the folder: '{0}'", path), "Refresh Failed", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Error, System.Windows.MessageBoxResult.OK);
                Reporter.ToLog(eLogLevel.ERROR, $"Method - {MethodBase.GetCurrentMethod().Name}, Error - {ex.Message}");
                mBulkOperationIsInProcess = false;
            }
        }
Ejemplo n.º 2
0
        public override void RefreshTreeFolder(Type itemType, string path)
        {
            try
            {
                if (Reporter.ToUser(eUserMsgKey.RefreshFolder) == Amdocs.Ginger.Common.eUserMsgSelection.Yes)
                {
                    mBulkOperationIsInProcess = true;
                    //refresh cache
                    RepositoryFolderBase repoFolder = (RepositoryFolderBase)(((ITreeViewItem)this).NodeObject());
                    if (repoFolder != null)
                    {
                        repoFolder.ReloadItems(); // .RefreshFolderCache();
                    }
                    //refresh tree
                    mTreeView.Tree.RefresTreeNodeChildrens((ITreeViewItem)this);

                    mBulkOperationIsInProcess = false;
                }
            }
            catch (Exception ex)
            {
                Reporter.ToUser(eUserMsgKey.RefreshFailed, "Failed to refresh the item type cache for the folder: " + path);
                Reporter.ToLog(eLogLevel.ERROR, $"Method - {MethodBase.GetCurrentMethod().Name}, Error - {ex.Message}", ex);
                mBulkOperationIsInProcess = false;
            }
        }