protected void Page_Load(object sender, EventArgs e) { sessionId = Request.QueryString["ssid"]; if (!string.IsNullOrEmpty(sessionId)) { session = SessionService.GetSessionById(SessionVariable.Current.Company.Id, sessionId); } if (!IsPostBack) { if (session != null) { CourseName.Text = session.Course.Name; switch (session.Course.CourseLocation) { case CourseLocationEnum.Offline: OfflineSession.Visible = true; break; case CourseLocationEnum.Online: OnlineSession.Visible = true; break; default: OnlineSession.Visible = true; OfflineSession.Visible = true; break; } BindSessionData(session); } } }
private void BindSessionData(Lms.Domain.Models.Courses.Session session) { SessionName.Text = session.Name; Description.Text = session.Description; Cost.Text = session.Cost.ToString(); SessionDate.Text = session.SessionStart.ToString(CultureInfo.InvariantCulture) + " - " + session.SessionEnd.ToString(CultureInfo.InvariantCulture); EnrollDate.Text = session.EnrollStart.ToString(CultureInfo.InvariantCulture) + " - " + session.EnrollEnd.ToString(CultureInfo.InvariantCulture); logger.Debug(SessionDate.Text); }