Example #1
0
 protected void CourseListRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         _currentUserCourse = (UserCourseInfo)e.Item.DataItem;
         if (_currentUserCourse != null)
         {
             List<SkuStatisticsClassInfo> usrClassList = userCourseData.GetCourseClasses(_currentUserCourse.Id);
             Repeater InnerRepeater = (Repeater)e.Item.FindControl("InnerRepeater");
             InnerRepeater.DataSource = usrClassList;
             InnerRepeater.DataBind();
         }
     }
 }
Example #2
0
 public static UserCourseInfo ToUserCourseInfoWithCompletedPercent(this DataRow dr)
 {
     UserCourseInfo usrCourse = new UserCourseInfo
     {
         Id = dr.GetInt("Id"),
         Title = dr.GetString("Title"),
         Description = dr.GetString("Description"),
         Visible = dr.GetBoolean("Visible"),
         CreatedTimestamp = dr.GetDate("CreatedTimestamp"),
         UpdatedTimestamp = dr.GetDate("UpdatedTimestamp"),
         Sku = dr.GetString("Sku"),
         LockedOut = dr.GetBoolean("LockedOut"),
         EnrollmentStart = dr.GetDate("EnrollmentStart")
     };
     usrCourse.PercentCompleted = dr.GetDouble("Percentage");
     return usrCourse;
 }