Ejemplo n.º 1
0
        public Models.GroupLink GetAvailableGroup(string type, string leftText, string rightText)
        {
            var group = new Models.GroupLink
            {
                LeftText  = string.IsNullOrEmpty(leftText) ? "Group One" : leftText,
                RightText = string.IsNullOrEmpty(rightText) ? "Group Two" : rightText
            };

            var tagLists = ResolveUIEntityGroup(type);

            if (!tagLists.Any())
            {
                return(null);
            }

            if (tagLists.Keys.First().Count > 0)
            {
                group.LeftGroupTags = TagUILogic.ToModelTags(tagLists.Keys.ElementAt(0)).ToList();
            }
            if (tagLists.Values.First().Count > 0)
            {
                group.RightGroupTags = TagUILogic.ToModelTags(tagLists.Values.ElementAt(0)).ToList();
            }

            return(group);
        }
Ejemplo n.º 2
0
        //TODO: Move to UI App
        private void ResolveGroupLink(Models.GroupLink groupLink, string groupOne, string groupTwo, string creatorPrincipalId, string type)
        {
            switch (type)
            {
            case UITaggableEntity.User:
                _groupLinkBusinessLogic.AddToLinkEntities <User, Kiosk>(ToCommonGroupLink(groupLink), groupOne, groupTwo, creatorPrincipalId);
                break;

                //case UITaggableEntity.Application:
                //    _groupLinkBusinessLogic.AddToLinkEntities<Application, Kiosk>(ToCommonGroupLink(groupLink), groupOne, groupTwo, creatorPrincipalId);
                //    break;

                //case UITaggableEntity.ItemRegistration:
                //    _groupLinkBusinessLogic.AddToLinkEntities<ItemRegistration, Kiosk>(ToCommonGroupLink(groupLink), groupOne, groupTwo, creatorPrincipalId);

                //    break;

                //case UITaggableEntity.ContentPackage:
                //    _groupLinkBusinessLogic.AddToLinkEntities<ContentPackage, Kiosk>(ToCommonGroupLink(groupLink), groupOne, groupTwo, creatorPrincipalId);

                //    break;

                //case UITaggableEntity.SchedulePlan:
                //    _groupLinkBusinessLogic.AddToLinkEntities<SchedulePlan, Kiosk>(ToCommonGroupLink(groupLink), groupOne, groupTwo, creatorPrincipalId);

                //    break;

                //case UITaggableEntity.Device:
                //    _groupLinkBusinessLogic.AddToLinkEntities<Kiosk, SchedulePlan>(ToCommonGroupLink(groupLink), groupOne, groupTwo, creatorPrincipalId);

                //    break;
            }
        }
Ejemplo n.º 3
0
 public static Lok.Unik.ModelCommon.Client.GroupLink ToCommonGroupLink(Models.GroupLink groupLink)
 {
     return(new Lok.Unik.ModelCommon.Client.GroupLink
     {
         Id = groupLink.Id,
         Name = groupLink.Name,
         GroupOne = groupLink.GroupOne,
         GroupTwo = groupLink.GroupTwo,
         CreatorPrincipalId = groupLink.CreatorPrincipalId,
         CreateDate = groupLink.CreateDate
     });
 }
Ejemplo n.º 4
0
 public bool ExistGroups(Models.GroupLink group)
 {
     return(group.LeftGroupTags != null && group.RightGroupTags != null);
 }
Ejemplo n.º 5
0
 public void AddToLinkEntities(Models.GroupLink groupLink, string groupOne, string groupTwo, string creatorPrincipalId, string type)
 {
     ResolveGroupLink(groupLink, groupOne, groupTwo, creatorPrincipalId, type);
 }