| |
|||
Прежде всего необходимо определить, зарегистрировался ли учащийся. Если нет, он направляется на регистрацию:
Response.Redirect("./index.aspx") End If
("Select SectionName from CourseSections Where " _ & "CourseSectionID = " & Session("CourseSectionID") _ , DBConn) DBCommand.Fill(DSPageData, _ "SectionName")
& DSPageData.Tables("SectionName"). Rows(0).Item("SectionName") _ & "</center>
("Select SectionContentID, SectionContentTitle, " _ & "SectionContent from SectionContents Where " & "SectionContentID= (Select Min(SectionContentID) " _ & "From SectionContents Where CourseSectionlD • " _ & Session("CourseSectionlD") & ")", DBConn) DBCommand.Fill(DSPageData, _ "SectionContent")
DSPageData.Tables("SectionContent"). _ Rows(0).Item("SectionContentID")
Rows(0).ItemC'SectionContentTitle") _ & "<br><br>" _ & DSPageData.Tables("SectionContent"). _ Rows(O).Item("SectionContent")
Dim DBConn asOleDbConnection Dim DBCommand 'As OleDbDataAdapter Dim DSPageData as New DataSet DBConn = New OleDbConnection("Provider=sqloledb;" _ & "server=localhost;" _ & "Initial*Catalog-INETC9;" _ & "User Id=sa;" & "Password=yourpassword;") DBCommand = New OleDbDataAdapter _ ("Select SectionContentID, SectionContentTitle," _ & "SectionContent from SectionContents Where " _ & "SectionContentID = (Select Min(SectionContentID) " _ & "From SectionContents Where SectionContentID > " _ & Session("CurrentSectionContentlD") _ & " and CourseSectionlD = " _ & Session ("CourseSectionlD") & ")", DBConn) DBCommand.Fill(DSPageData, _ "SectionContent") If DSPageData.Tables("SectionConteht"} .Rows.Count = 0 Then Response.Redirect("./course.aspx") Else Session("CurrentSectionContentlD") -'_ DSPageData.Tables("SectionContent"). _ Rows(0).Item("SectionContentID") IblMessage.Text » DSPageData.Tables("SectionContent"). _ Rows(0).ItemC'SectionContentTitle") _ & "<br><br>" _ & DSPageData.Tables("SectionContent"). _ Rows(O).Item("SectionContent") End If End Sub |
|||