Exemplo n.º 1
0
        /// <summary>
        /// Gets the property value by name.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <param name="propertyName">Name of the property.</param>
        /// <returns></returns>
        public static object GetPropertyValueByName(EvlVScore entity, string propertyName)
        {
            switch (propertyName)
            {
            case "Id":
                return(entity.Id);

            case "Userid":
                return(entity.Userid);

            case "Assessmentid":
                return(entity.Assessmentid);

            case "CatalogOneid":
                return(entity.CatalogOneid);

            case "CatalogTwoid":
                return(entity.CatalogTwoid);

            case "Behaviorid":
                return(entity.Behaviorid);

            case "Scorelevel":
                return(entity.Scorelevel);

            case "Score":
                return(entity.Score);

            case "Evltimes":
                return(entity.Evltimes);

            case "ModelId":
                return(entity.ModelId);

            case "Assessmentname":
                return(entity.Assessmentname);

            case "CatalogOnename":
                return(entity.CatalogOnename);

            case "CatalogTwoname":
                return(entity.CatalogTwoname);
            }
            return(null);
        }
Exemplo n.º 2
0
        ///<summary>
        /// A simple factory method to create a new <see cref="EvlVScore"/> instance.
        ///</summary>
        ///<param name="_id"></param>
        ///<param name="_userid"></param>
        ///<param name="_assessmentid"></param>
        ///<param name="_catalogOneid"></param>
        ///<param name="_catalogTwoid"></param>
        ///<param name="_behaviorid"></param>
        ///<param name="_scorelevel"></param>
        ///<param name="_score"></param>
        ///<param name="_evltimes"></param>
        ///<param name="_modelId"></param>
        ///<param name="_assessmentname"></param>
        ///<param name="_catalogOnename"></param>
        ///<param name="_catalogTwoname"></param>
        public static EvlVScore CreateEvlVScore(System.Int32 _id, System.String _userid, System.Int32?_assessmentid, System.Int32?_catalogOneid, System.Int32?_catalogTwoid, System.Int32?_behaviorid, System.Int32?_scorelevel, System.Decimal?_score, System.Int32?_evltimes, System.Int32?_modelId, System.String _assessmentname, System.String _catalogOnename, System.String _catalogTwoname)
        {
            EvlVScore newEvlVScore = new EvlVScore();

            newEvlVScore.Id             = _id;
            newEvlVScore.Userid         = _userid;
            newEvlVScore.Assessmentid   = _assessmentid;
            newEvlVScore.CatalogOneid   = _catalogOneid;
            newEvlVScore.CatalogTwoid   = _catalogTwoid;
            newEvlVScore.Behaviorid     = _behaviorid;
            newEvlVScore.Scorelevel     = _scorelevel;
            newEvlVScore.Score          = _score;
            newEvlVScore.Evltimes       = _evltimes;
            newEvlVScore.ModelId        = _modelId;
            newEvlVScore.Assessmentname = _assessmentname;
            newEvlVScore.CatalogOnename = _catalogOnename;
            newEvlVScore.CatalogTwoname = _catalogTwoname;
            return(newEvlVScore);
        }
Exemplo n.º 3
0
        ///<summary>
        ///  Returns a Typed EvlVScoreBase Entity
        ///</summary>
        public virtual EvlVScoreBase Copy()
        {
            //shallow copy entity
            EvlVScore copy = new EvlVScore();

            copy.Id             = this.Id;
            copy.Userid         = this.Userid;
            copy.Assessmentid   = this.Assessmentid;
            copy.CatalogOneid   = this.CatalogOneid;
            copy.CatalogTwoid   = this.CatalogTwoid;
            copy.Behaviorid     = this.Behaviorid;
            copy.Scorelevel     = this.Scorelevel;
            copy.Score          = this.Score;
            copy.Evltimes       = this.Evltimes;
            copy.ModelId        = this.ModelId;
            copy.Assessmentname = this.Assessmentname;
            copy.CatalogOnename = this.CatalogOnename;
            copy.CatalogTwoname = this.CatalogTwoname;
            copy.AcceptChanges();
            return((EvlVScore)copy);
        }