<!--#include file="Admin_Common.asp"-->
<!--#include file="../SDMS/Conn.asp"-->
<%
'**************************************************************
' Software name: PowerEasy SiteWeaver
' Web: http://www.powereasy.net
' Copyright (C) 2005－2009 佛山市动易网络科技有限公司 版权所有
'**************************************************************

Function GetGrade_Option()
    Dim rsGKind, strOption, i
    i = 0
    Set rsGKind = Conn_Sdms.Execute("select * from Grade where Disabled=false order by OrderID asc")
    Do While Not rsGKind.EOF
        strOption = strOption & "<option value='" & rsGKind("GradeID") & "'"
        If i = 0 Then
            strOption = strOption & " selected"
        End If
        strOption = strOption & ">" & rsGKind("GradeName") & "</option>"
        i = i + 1
        rsGKind.MoveNext
    Loop
    Set rsGKind = Nothing
    GetGrade_Option = strOption
End Function

Function GetClass_Option(ShowType)
    Dim Rs, Sql, RsClass, SqlClass, strOption
    strOption = "<form name='Classes' method='post' action=''>"
    Set Rs = Conn_Sdms.Execute("select * from Grade where Disabled=false order by OrderID asc")
    Do While Not Rs.EOF
        strOption = strOption & "<select name='Grade" & Rs("GradeID") & "'>"
        If ShowType = 0 Then
            strOption = strOption & "<option value='All'>全级</option>"
        End If
        Set RsClass = Conn_Sdms.Execute("select * from Class where GradeID=" & Rs("GradeID") & " order by OrderID asc")
        While (Not RsClass.EOF)
            strOption = strOption & "<option value='" & RsClass("ClassID") & "' >" & RsClass("ClassName") & "</option>"
            RsClass.MoveNext
        Wend
        Set RsClass = Nothing
        Rs.MoveNext
        strOption = strOption & "</select><br>"
    Loop
    Set Rs = Nothing
    strOption = strOption & "</form>"
    GetClass_Option = strOption
End Function
%>
