Ejemplo n.º 1
0
 private void ViewRepositoryItemUsage(object sender, RoutedEventArgs e)
 {
     if (xActivitiesRepositoryGrid.Grid.SelectedItem != null)
     {
         RepositoryItemUsagePage usagePage = new RepositoryItemUsagePage((RepositoryItemBase)xActivitiesRepositoryGrid.Grid.SelectedItem);
         usagePage.ShowAsWindow();
     }
     else
     {
         Reporter.ToUser(eUserMsgKey.NoItemWasSelected);
     }
 }
Ejemplo n.º 2
0
 private void ViewRepositoryItemUsage(object sender, RoutedEventArgs e)
 {
     if (grdVariables.Grid.SelectedItem != null)
     {
         RepositoryItemUsagePage usagePage = new RepositoryItemUsagePage((RepositoryItem)grdVariables.Grid.SelectedItem);
         usagePage.ShowAsWindow();
     }
     else
     {
         Reporter.ToUser(eUserMsgKeys.NoItemWasSelected);
     }
 }
 private void ViewRepositoryItemUsage(object sender, RoutedEventArgs e)
 {
     if (xActivitiesGroupsRepositoryGrid.Grid.SelectedItem != null)
     {
         RepositoryItemUsagePage usagePage = new RepositoryItemUsagePage((RepositoryItemBase)xActivitiesGroupsRepositoryGrid.Grid.SelectedItem);
         usagePage.extraDetails = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Activity>();
         usagePage.ShowAsWindow();
     }
     else
     {
         Reporter.ToUser(eUserMsgKey.NoItemWasSelected);
     }
 }
        public static bool CheckIfSureDoingChange(RepositoryItemBase item, string changeType)
        {
            RepositoryItemUsagePage usagePage = null;

            usagePage = new RepositoryItemUsagePage(item, true);
            if (usagePage.RepoItemUsages.Count > 0)//TODO: check if only one instance exist for showing the pop up for better performance
            {
                if (Reporter.ToUser(eUserMsgKey.AskIfWantsToChangeeRepoItem, item.GetNameForFileName(), usagePage.RepoItemUsages.Count, changeType) == Amdocs.Ginger.Common.eUserMsgSelection.Yes)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            return(true);
        }