254 lines
5.0 KiB
C#
254 lines
5.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HRM.BO
|
|
{
|
|
public class Courses : BasicBaseObject
|
|
{
|
|
#region Constructor
|
|
public Courses() {
|
|
_courseTitle = "";
|
|
_courseCode = "";
|
|
_description = "";
|
|
_difficultyLevel = EnumDifficultyLevel.Beginner;
|
|
_isForFree = true;
|
|
_price = 0.0;
|
|
_totalEnrollments = 0;
|
|
_rating = 0;
|
|
_popularityScore = 0;
|
|
_completionRate = 0;
|
|
_averageProgress = 0;
|
|
_isExamRequired = false;
|
|
_tags = "";
|
|
}
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
#region CourseTitle
|
|
private string _courseTitle;
|
|
public string CourseTitle
|
|
{
|
|
get { return _courseTitle; }
|
|
set { _courseTitle = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CourseCode
|
|
private string _courseCode;
|
|
public string CourseCode
|
|
{
|
|
get { return _courseCode; }
|
|
set { _courseCode = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CourseTypeID
|
|
private int _courseTypeID;
|
|
public int CourseTypeID
|
|
{
|
|
get { return _courseTypeID; }
|
|
set { _courseTypeID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Description
|
|
private string _description;
|
|
public string Description
|
|
{
|
|
get { return _description; }
|
|
set { _description = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region DifficultyLevel
|
|
private EnumDifficultyLevel _difficultyLevel;
|
|
public EnumDifficultyLevel DifficultyLevel
|
|
{
|
|
get { return _difficultyLevel; }
|
|
set { _difficultyLevel = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region TrainerID
|
|
private int _trainerID;
|
|
public int TrainerID
|
|
{
|
|
get { return _trainerID; }
|
|
set { _trainerID = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Duration
|
|
private string _duration;
|
|
public string Duration
|
|
{
|
|
get { return _duration; }
|
|
set { _duration = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsForFree
|
|
private bool? _isForFree;
|
|
public bool? IsForFree
|
|
{
|
|
get { return _isForFree; }
|
|
set { _isForFree = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Price
|
|
private double? _price;
|
|
public double? Price
|
|
{
|
|
get { return _price; }
|
|
set { _price = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region TotalEnrollments
|
|
private int? _totalEnrollments;
|
|
public int? TotalEnrollments
|
|
{
|
|
get { return _totalEnrollments; }
|
|
set { _totalEnrollments = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Rating
|
|
private decimal? _rating;
|
|
public decimal? Rating
|
|
{
|
|
get { return _rating; }
|
|
set { _rating = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region PopularityScore
|
|
private float? _popularityScore;
|
|
public float? PopularityScore
|
|
{
|
|
get { return _popularityScore; }
|
|
set { _popularityScore = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CompletionRate
|
|
private float? _completionRate;
|
|
public float? CompletionRate
|
|
{
|
|
get { return _completionRate; }
|
|
set { _completionRate = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region AverageProgress
|
|
private float? _averageProgress;
|
|
public float? AverageProgress
|
|
{
|
|
get { return _averageProgress; }
|
|
set { _averageProgress = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region IsExamRequired
|
|
private bool? _isExamRequired;
|
|
public bool? IsExamRequired
|
|
{
|
|
get { return _isExamRequired; }
|
|
set { _isExamRequired = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Tags
|
|
private string _tags;
|
|
public string Tags
|
|
{
|
|
get { return _tags; }
|
|
set { _tags = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region TargetedAudience
|
|
private string _targetedAudience;
|
|
public string TargetedAudience
|
|
{
|
|
get { return _targetedAudience; }
|
|
set { _targetedAudience = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region LearningOutcomes
|
|
private string _learningOutcomes;
|
|
public string LearningOutcomes
|
|
{
|
|
get { return _learningOutcomes; }
|
|
set { _learningOutcomes = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region CourseIncludes
|
|
private string _courseIncludes;
|
|
public string CourseIncludes
|
|
{
|
|
get { return _courseIncludes; }
|
|
set { _courseIncludes = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region StartGuideLine
|
|
private string _startGuideLine;
|
|
public string StartGuideLine
|
|
{
|
|
get { return _startGuideLine; }
|
|
set { _startGuideLine = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Lessons
|
|
public List<Lessons> Lessons;
|
|
#endregion
|
|
|
|
#region CourseTemplate
|
|
public LMSTemplate CourseTemplate;
|
|
#endregion
|
|
|
|
#region Others Property
|
|
public CourseType CourseType;
|
|
public int TotalLesson;
|
|
public int TotalContent;
|
|
public Employee Trainer;
|
|
#endregion
|
|
|
|
#region Enrollments, CourseProgress, LessonProgress (Only for users)
|
|
public Enrollments Enrollments;
|
|
public CourseProgres CourseProgres;
|
|
public List<LessonProgress> LessonProgres;
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
|
|
#region ICourses
|
|
public interface ICoursesService
|
|
{
|
|
int Save(Courses oCourses);
|
|
void Delete(int ID);
|
|
void UpdateStatus(Courses oCourses);
|
|
void UpdateTotalEnrollments(int courseID);
|
|
Courses Get(int ID);
|
|
Courses GetCourseForUser(int ID, int userID);
|
|
Courses GetForEnrollment(int ID, int userID);
|
|
Courses UserCourseProgress(Courses oCourse);
|
|
List<Courses> Get(EnumStatus status);
|
|
List<Courses> Get(EnumStatus status, int userID);
|
|
List<Courses> GetAll();
|
|
List<Courses> GetByRating(float rating);
|
|
List<Courses> GetByDifficultyLevel (EnumDifficultyLevel level);
|
|
}
|
|
#endregion
|
|
}
|