Exemple #1
0
        private static String GetFilterParameters(dtoDisplayTimelineContext context)
        {
            switch (context.Display)
            {
            case SummaryDisplay.All:
                switch (context.Container)
                {
                case PageContainerType.ProjectsList:
                    return(GetFilterParameters(ItemsGroupBy.Plain, ProjectFilterBy.All, ItemListStatus.Active, context.ContainerTimeline, context.Display));

                case PageContainerType.Dashboard:
                    return(GetFilterParameters(context.GroupBy, context.FilterBy, context.Status, context.ContainerTimeline, context.Display));
                }
                break;

            case SummaryDisplay.Filtered:
                switch (context.Container)
                {
                case PageContainerType.ProjectsList:
                    return(GetFilterParameters(ItemsGroupBy.Plain, context.FilterBy, ItemListStatus.Active, context.ContainerTimeline, context.Display));

                case PageContainerType.Dashboard:
                    return(GetFilterParameters(context.GroupBy, context.FilterBy, context.Status, context.ContainerTimeline, context.Display));
                }
                break;

            case SummaryDisplay.Project:
                return(GetFilterParameters(context.GroupBy, context.FilterBy, context.Status, context.ContainerTimeline, context.Display));
            }
            return("");
        }
Exemple #2
0
        public static String Dashboard(dtoDisplayTimelineContext context, long idProject, PageListType toPage, UserActivityStatus actStatus, SummaryTimeLine actTimeline)
        {
            String page = GetDashboardPage(context.ProjectContext, idProject, toPage);

            page += GetPageParameters(context.FromPage, context.IdContainerCommunity) + GetFilterParameters(context) + GetDashboardActivityParametes(actStatus, actTimeline);
            return(page);
        }
 private String GenerateUrl(dtoTimelineActivity activity, dtoDisplayTimelineContext context)
 {
     return(RootObject.Dashboard(context, context.IdProject, GetDashboardPageByContainer(context.Container, activity.DashboardPage), activity.Status, activity.TimeLine));
     //switch(display){
     //    case SummaryDisplay.All:
     //        return RootObject.Dashboard(context,fromPage,idContainerCommunity, activity.DashboardPage, timeline, activity.IdProject, ItemsGroupBy.Plain, ProjectFilterBy.All, ItemListStatus.Late, display);
     //    case SummaryDisplay.Filtered:
     //        return RootObject.Dashboard(context, fromPage, idContainerCommunity, activity.DashboardPage, timeline, activity.IdProject, ItemsGroupBy.Plain, ProjectFilterBy.All, activity.Status , display);
     //    case SummaryDisplay.Project:
     //        return null;
     //}
 }
        public object Clone()
        {
            dtoDisplayTimelineContext clone = new dtoDisplayTimelineContext();

            clone.IdContainerCommunity = IdContainerCommunity;
            clone.FilterBy             = FilterBy;
            clone.Display           = Display;
            clone.ProjectContext    = ProjectContext;
            clone.FromPage          = FromPage;
            clone.CurrentPage       = CurrentPage;
            clone.ContainerTimeline = ContainerTimeline;
            clone.Container         = Container;
            clone.GroupBy           = GroupBy;
            clone.Status            = Status;
            clone.IdProject         = clone.IdProject;
            return(clone);
        }
 public dtoDisplayTimelineSummary(dtoTimelineSummary item, dtoDisplayTimelineContext context)
 {
     DisplayAs  = item.DisplayAs;
     ToPage     = item.DashboardPage;
     Activities = item.Activities.Where(a => a.TimeLine == SummaryTimeLine.Today || a.TimeLine == context.ContainerTimeline).Select(a => new dtoDisplayTimelineActivity(a, GenerateUrl(a, context))
     {
         ToPage = GetDashboardPageByContainer(context.Container, item.DashboardPage)
     }).ToList();
     if (Activities.Count == 1)
     {
         Activities[0].DisplayAs = lm.Comol.Core.DomainModel.ItemDisplayOrder.first | lm.Comol.Core.DomainModel.ItemDisplayOrder.last;
     }
     else if (Activities.Any())
     {
         Activities.First().DisplayAs = lm.Comol.Core.DomainModel.ItemDisplayOrder.first;
         Activities.Last().DisplayAs  = lm.Comol.Core.DomainModel.ItemDisplayOrder.last;
     }
 }
Exemple #6
0
 public static String Dashboard(dtoDisplayTimelineContext context, PageListType toPage, UserActivityStatus actStatus, SummaryTimeLine actTimeline)
 {
     return(Dashboard(context, 0, toPage, actStatus, actTimeline));
 }