Imports System.Data
Imports AppCommon
Imports AppVariable

Partial Class training_studentinit
    Inherits System.Web.UI.Page

#Region "******************** メンバ変数 ********************"
    Private _param As TrainingParam
    Private _user As LoginUser
#End Region

#Region "******************** ページイベント ********************"
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        _param = DirectCast(Session(S_Training_Seleted_Param), TrainingParam)
        _user = DirectCast(Session(S_COM_LoginUser), LoginUser)

        Get申込Key()

        'ページ遷移
        Response.Redirect(Com_Get_Content(FunctionCd.TrainingApplyConfirm))
    End Sub
#End Region

#Region "******************* Sub及びFunction ********************"
    Private Sub Get申込Key()
        Dim dt As DataTable
        Using spm As New StoredProcedureManager("申込_申込KEY_GET")
            spm.AddPrmIn("@学籍NO", SqlDbType.VarChar, _user.USERCD)
            spm.Fill()

            dt = spm.ds.Tables(0)
        End Using

        _param = New TrainingParam
        _param.履修年度 = dt.Rows(0)("履修年度").ToString
        _param.成績年度 = dt.Rows(0)("成績年度").ToString
        _param.分野CD = dt.Rows(0)("分野CD").ToString
        _param.科目CD = dt.Rows(0)("科目CD").ToString
        _param.講座CD = dt.Rows(0)("講座CD").ToString
        _param.連番 = dt.Rows(0)("連番").ToString
        Session(S_Training_Seleted_Param) = _param
    End Sub
#End Region

End Class
