Imports System.Data
Imports AppVariable

Partial Class uc_infoCardClass
    Inherits System.Web.UI.UserControl

#Region "******************** ページイベント ********************"

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session(S_Info_Selected_No) Is Nothing Then
            Session(S_Info_Selected_No) = 0
        End If

        frm_info.DataSource = GetData()
        frm_info.DataBind()

        If Not CType(frm_info.FindControl("gv_予定"), GridView) Is Nothing Then
            CType(frm_info.FindControl("gv_予定"), GridView).DataSource = GetData_予定()
            CType(frm_info.FindControl("gv_予定"), GridView).DataBind()
        End If
    End Sub

#End Region

#Region "******************* Sub及びFunction ********************"

    Private Function GetData() As DataSet
        Using spm As New StoredProcedureManager("掲示_掲示個別_授業_SELECT")
            spm.AddPrmIn("@掲示NO", Data.SqlDbType.Int, Session(S_Info_Selected_No))
            spm.Fill()

            Return spm.ds
        End Using
    End Function

    Private Function GetData_予定() As DataSet
        Using spm As New StoredProcedureManager("掲示_掲示個別_対象予定_SELECT")
            spm.AddPrmIn("@掲示NO", Data.SqlDbType.Int, Session(S_Info_Selected_No))
            spm.Fill()

            Return spm.ds
        End Using
    End Function

#End Region

End Class
