Exemple #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(VwDegreeCourses entity, string propertyName)
        {
            switch (propertyName)
            {
            case "DegreeId":
                return(entity.DegreeId);

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

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

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

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

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

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

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

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

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

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

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

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

            case "InstituteId":
                return(entity.InstituteId);
            }
            return(null);
        }
Exemple #2
0
        ///<summary>
        /// A simple factory method to create a new <see cref="VwDegreeCourses"/> instance.
        ///</summary>
        ///<param name="_degreeId"></param>
        ///<param name="_degreeName"></param>
        ///<param name="_degreesDescription"></param>
        ///<param name="_credithour"></param>
        ///<param name="_degreeStatus"></param>
        ///<param name="_degreeCourseId"></param>
        ///<param name="_courseName"></param>
        ///<param name="_courseStyle"></param>
        ///<param name="_courseId"></param>
        ///<param name="_degreeCoursesDescription"></param>
        ///<param name="_degreeCoursesCreditHour"></param>
        ///<param name="_degreeCourseStatus"></param>
        ///<param name="_isRequiredCourse"></param>
        ///<param name="_instituteId"></param>
        public static VwDegreeCourses CreateVwDegreeCourses(System.Int32 _degreeId, System.String _degreeName, System.String _degreesDescription, System.Int32?_credithour, System.Int32?_degreeStatus, System.Int32 _degreeCourseId, System.String _courseName, System.Int32?_courseStyle, System.String _courseId, System.String _degreeCoursesDescription, System.Int32?_degreeCoursesCreditHour, System.Int32 _degreeCourseStatus, System.Int32 _isRequiredCourse, System.String _instituteId)
        {
            VwDegreeCourses newVwDegreeCourses = new VwDegreeCourses();

            newVwDegreeCourses.DegreeId                 = _degreeId;
            newVwDegreeCourses.DegreeName               = _degreeName;
            newVwDegreeCourses.DegreesDescription       = _degreesDescription;
            newVwDegreeCourses.Credithour               = _credithour;
            newVwDegreeCourses.DegreeStatus             = _degreeStatus;
            newVwDegreeCourses.DegreeCourseId           = _degreeCourseId;
            newVwDegreeCourses.CourseName               = _courseName;
            newVwDegreeCourses.CourseStyle              = _courseStyle;
            newVwDegreeCourses.CourseId                 = _courseId;
            newVwDegreeCourses.DegreeCoursesDescription = _degreeCoursesDescription;
            newVwDegreeCourses.DegreeCoursesCreditHour  = _degreeCoursesCreditHour;
            newVwDegreeCourses.DegreeCourseStatus       = _degreeCourseStatus;
            newVwDegreeCourses.IsRequiredCourse         = _isRequiredCourse;
            newVwDegreeCourses.InstituteId              = _instituteId;
            return(newVwDegreeCourses);
        }
Exemple #3
0
        ///<summary>
        ///  Returns a Typed VwDegreeCoursesBase Entity
        ///</summary>
        public virtual VwDegreeCoursesBase Copy()
        {
            //shallow copy entity
            VwDegreeCourses copy = new VwDegreeCourses();

            copy.DegreeId                 = this.DegreeId;
            copy.DegreeName               = this.DegreeName;
            copy.DegreesDescription       = this.DegreesDescription;
            copy.Credithour               = this.Credithour;
            copy.DegreeStatus             = this.DegreeStatus;
            copy.DegreeCourseId           = this.DegreeCourseId;
            copy.CourseName               = this.CourseName;
            copy.CourseStyle              = this.CourseStyle;
            copy.CourseId                 = this.CourseId;
            copy.DegreeCoursesDescription = this.DegreeCoursesDescription;
            copy.DegreeCoursesCreditHour  = this.DegreeCoursesCreditHour;
            copy.DegreeCourseStatus       = this.DegreeCourseStatus;
            copy.IsRequiredCourse         = this.IsRequiredCourse;
            copy.InstituteId              = this.InstituteId;
            copy.AcceptChanges();
            return((VwDegreeCourses)copy);
        }