コード例 #1
0
        }        //

        public static void MapFromDB(Views.EntityCompetencyFramework_Items_Summary from, CredentialAlignmentObjectProfile to)
        {
            to.Id       = from.EntityCompetencyId;
            to.ParentId = from.EntityId;
            //to.CompetencyFrameworkId = from.CompetencyFrameworkId ?? 0;
            to.FrameworkName = from.FrameworkName;
            //add url?? to Entity for now?
            //don't populate if for registry
            //18-06-28 mparsons - aim to make FrameworkUrl obsolete!
            //                  - SourceUrl should be populated
            //if ( from.FrameworkUrl.ToLower().IndexOf("credentialengineregistry.org/resources/ce-") == -1 )
            //{
            //    to.FrameworkUrl = from.FrameworkUrl;
            //}
            //else if ( !string.IsNullOrWhiteSpace(from.SourceUrl) )
            //    to.FrameworkUrl = from.SourceUrl;
            //
            to.SourceUrl     = from.SourceUrl;
            to.FrameworkUri  = from.FrameworkUri;
            to.FrameworkCtid = from.FrameworkCtid;

            //
            to.TargetNode            = from.TargetNode;
            to.TargetNodeDescription = from.TargetNodeDescription;
            to.TargetNodeName        = from.Competency;
            to.Weight        = (from.Weight ?? 0M);
            to.CodedNotation = from.CodedNotation;

            if (IsValidDate(from.Created))
            {
                to.Created = ( DateTime )from.Created;
            }
        }
コード例 #2
0
        }        //

        public static void MapFromDB(Views.EntityCompetencyFramework_Items_Summary from, CredentialAlignmentObjectItem to)
        {
            to.Id = from.EntityCompetencyId;
            //to.EntityId = from.EntityId;

            //to.EducationFrameworkId = from.EntityCompetencyFrameworkItemId;
            to.TargetNodeName        = from.Competency;
            to.TargetNodeDescription = from.TargetNodeDescription;
            if (to.TargetNodeDescription == to.TargetNodeName)
            {
                to.TargetNodeDescription = "";
            }

            to.TargetNode    = from.TargetNode;
            to.CodedNotation = from.CodedNotation;
            //to.Weight = from.Weight ?? 0;
            //not applicable here
            to.ConnectionTypeId = from.ConnectionTypeId;

            if (IsValidDate(from.Created))
            {
                to.Created = ( DateTime )from.Created;
            }
            //added these as used by Competencies search, determine if needed!
            //the source is determined by the search type
            to.SourceParentId     = (int)from.EntityBaseId;
            to.SourceEntityTypeId = from.EntityTypeId;

            to.FrameworkName = from.FrameworkName ?? "None";
            if (!string.IsNullOrWhiteSpace(from.FrameworkUri))
            {
                to.FrameworkUri = from.FrameworkUri ?? "";
            }
            else
            {
                to.FrameworkUri = from.SourceUrl ?? "";
            }
        }               //