Beispiel #1
0
 ///<summary>
 /// Load the Description in the CultureCode language from DB. You must set CourseId and CultureCode to get the Description
 ///</summary>
 public void LoadDescription()
 {
     if (TheCourse == null || TheCourse.CourseId == 0 || CultureCode == null)
         throw new Exception("Cannot load Description. Need CourseId and CultureCode");
     BaseRepository rep = new BaseRepository();
     TheDescription = rep.GetCurrentVersionText(CultureCode, TheCourse.CourseId, ETextItemType.CourseDescription);
 }
Beispiel #2
0
 /// <summary>
 /// Loads an existing Course in the language cultureCode
 /// Only loads the CourseEntity.
 /// </summary>
 /// <param name="cultureCode"></param>
 /// <param name="CourseId"></param>
 public CourseContainer(string cultureCode, int CourseId)
 {
     BaseRepository rep = new BaseRepository();
     CultureCode = cultureCode;
     TheCourse = rep.GetCourse(CourseId);
 }
Beispiel #3
0
 public void UpdatePluggEntity()
 {
     BaseRepository rep = new BaseRepository();
     rep.UpdatePlugg(ThePlugg);
 }
Beispiel #4
0
 ///<summary>
 /// Loads all the components of a Plugg into TheComponents.
 /// Note: If the actual content of the component has not yet been created, Load will create an empty object with the correct ItemType
 ///</summary>
 /// <returns> returns nothing.</returns>
 public void LoadComponents()
 {
     BaseRepository rep = new BaseRepository();
     TheComponents = rep.GetAllComponentsInPlugg(ThePlugg.PluggId);
 }
Beispiel #5
0
 /// <summary>
 /// Loads an existing Plugg in the language cultureCode
 /// </summary>
 /// <param name="cultureCode"></param>
 /// <param name="pluggId"></param>
 public PluggContainer(string cultureCode, int pluggId)
 {
     BaseRepository rep = new BaseRepository();
     CultureCode = cultureCode;
     ThePlugg = rep.GetPlugg(pluggId);
 }
Beispiel #6
0
 public void UpdateCourseEntity()
 {
     BaseRepository rep = new BaseRepository();
     rep.UpdateCourse(TheCourse);
 }
 ///<summary>
 /// Load the title in the CultureCode language from DB. You must set PluggId and CultureCode to get the Title
 ///</summary>
 public void LoadTitle()
 {
     if (ThePlugg == null || ThePlugg.PluggId == 0)
         throw new Exception("Cannot load title. Need PluggId");
     BaseRepository rep = new BaseRepository();
     TheTitle = rep.GetCurrentVersionText(CultureCode, ThePlugg.PluggId, ETextItemType.PluggTitle);
 }
 ///<summary>
 /// Load the Description in the CultureCode language from DB. You must set PluggId and CultureCode to get the Description
 ///</summary>
 public void LoadDescription()
 {
     if (ThePlugg == null || ThePlugg.PluggId == 0 || CultureCode == null)
         throw new Exception("Cannot load Description. Need PluggId and CultureCode");
     BaseRepository rep = new BaseRepository();
     TheTitle = rep.GetCurrentVersionText(CultureCode, ThePlugg.PluggId, ETextItemType.PluggDescription);
 }
Beispiel #9
0
 ///<summary>
 /// Load the title in the CultureCode language from DB. You must set CourseId and CultureCode to get the Title
 ///</summary>
 public void LoadRichRichText()
 {
     if (TheCourse == null || TheCourse.CourseId == 0)
         throw new Exception("Cannot load title. Need CourseId");
     BaseRepository rep = new BaseRepository();
     TheRichRichText = rep.GetCurrentVersionText(CultureCode, TheCourse.CourseId, ETextItemType.CourseRichRichText);
 }