'// 0월합계에대한 처리는 하였음
'// 완료일자 : 2010-03-08

Public Class C생산에너지
    Public Mon As String
    Private MIdx As Integer
    Private ErrMsg As String = "에너지소요량 계산되지 않았습니다"

    'Public Sub Calc_Summary()
    '    '//
    '    If MIdx <> 0 Then
    '        MsgBox("계산식은 0번 합계배열만 가능합니다")
    '        Return
    '    End If

    '    Dim I1 as decimal = 0
    '    Dim I2 as decimal = 0
    '    Dim I3 as decimal = 0
    '    Dim I4 as decimal = 0
    '    Dim I5 as decimal = 0
    '    Dim I6 as decimal = 0
    '    For i As Integer = 1 To 12
    '        '//12월을 다더해서 0번열에 기록한다.
    '        I1 += Result.생산E(i).태양광전력생산량
    '        I2 += Result.생산E(i).열병합전력생산량
    '        I3 += Result.생산E(i).태양열생산량
    '        I4 += Result.생산E(i).지열생산량
    '        I5 += Result.생산E(i).면적당생산량태양열
    '        I6 += Result.생산E(i).면적당생산량지열
    '    Next
    '    Me.태양광전력생산량 = I1
    '    Me.열병합전력생산량 = I2
    '    Me.태양열생산량 = I3
    '    Me.지열생산량 = I4
    '    Me.면적당생산량태양열 = I5
    '    Me.면적당생산량지열 = I6
    'End Sub

    Private DSETR As DSR
    Private Result As CResult
    Public Sub New(ByRef pdsetr As DSR, ByRef presult As CResult, Optional ByVal pmIdx As Integer = 0)
        DSETR = pdsetr
        Result = presult
        MIdx = pmIdx
        Mon = "M" & Format(MIdx, "00")
    End Sub
    Property 태양광전력생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).태양광전력생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0).전력태양광) ''("전력태양광"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                '    MsgBox("태양광기록(" & Mon & ")")
                DR(0)("전력태양광") = value
            End If
        End Set
    End Property


    Property 태양광전력생산량_offsite() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).태양광전력생산량_offsite
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0).전력태양광offsite) '("전력태양광offsite"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                '    MsgBox("태양광기록(" & Mon & ")")
                DR(0).전력태양광offsite = value
            End If
        End Set
    End Property

    Property 연료전지전력생산량_offsite() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).연료전지전력생산량_offsite
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0).연료전지전력생산량_offsite) '0'("연료전지전력offsite"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                '    MsgBox("태양광기록(" & Mon & ")")
                DR(0).연료전지전력생산량_offsite = value
            End If
        End Set
    End Property

   


    Property 풍력전력생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).풍력전력생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0).전력풍력) '("전력풍력"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                '    MsgBox("풍력기록(" & Mon & ")")
                DR(0)("전력풍력") = value
            End If
        End Set
    End Property
    Property 풍력전력생산량_offsite() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).풍력전력생산량_offsite
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0).전력풍력offsite) '("전력풍력offsite"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                '    MsgBox("풍력기록(" & Mon & ")")
                DR(0)("전력풍력offsite") = value
            End If
        End Set
    End Property

    Property 열병합전력생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).열병합전력생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0).전력열병합) '("전력열병합"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("전력열병합") = value
            End If
        End Set
    End Property
    Property 신재생열병합전력생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).신재생열병합전력생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("신재생열병합전력생산량"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("신재생열병합전력생산량") = value
            End If
        End Set
    End Property

    Property 신재생열병합열생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).신재생열병합열생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("신재생열병합열생산량"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("신재생열병합열생산량") = value
            End If
        End Set
    End Property


    Property 신재생면적당열생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).신재생면적당열생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("신재생면적당열생산량"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("신재생면적당열생산량") = value
            End If
        End Set
    End Property
    Property 신재생면적당열생산량_난방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).신재생면적당열생산량_난방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("신재생면적당열생산량_난방"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("신재생면적당열생산량_난방") = value
            End If
        End Set
    End Property
    Property 신재생면적당열생산량_냉방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).신재생면적당열생산량_냉방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("신재생면적당열생산량_냉방"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("신재생면적당열생산량_냉방") = value
            End If
        End Set
    End Property
    Property 신재생면적당열생산량_급탕() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).신재생면적당열생산량_급탕
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("신재생면적당열생산량_급탕"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("신재생면적당열생산량_급탕") = value
            End If
        End Set
    End Property

    Property 태양열생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).태양열생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("생산량태양열"))
                End If

            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("생산량태양열") = value
            End If
        End Set
    End Property
    Property 지열생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).지열생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("생산량지열"))

                End If

            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("생산량지열") = value
            End If
        End Set
    End Property
    Property 수열생산량() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).수열생산량
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("생산량수열"))

                End If

            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("생산량수열") = value
            End If
        End Set
    End Property
    Property 면적당생산량태양열() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량태양열
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량태양열"))

                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량태양열") = value
            End If
        End Set
    End Property
    Property 면적당생산량태양열_난방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량태양열_난방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량태양열_난방"))

                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량태양열_난방") = value
            End If
        End Set
    End Property
    Property 면적당생산량태양열_냉방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량태양열_냉방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량태양열_냉방"))

                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량태양열_냉방") = value
            End If
        End Set
    End Property
    Property 면적당생산량태양열_급탕() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량태양열_급탕
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량태양열_급탕"))

                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량태양열_급탕") = value
            End If
        End Set
    End Property


    Property 면적당생산량수열() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량수열
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량수열"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량수열") = value
            End If
        End Set
    End Property
    Property 면적당생산량수열_난방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량수열_난방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량수열_난방"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량수열_난방") = value
            End If
        End Set
    End Property
    Property 면적당생산량수열_냉방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량수열_냉방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량수열_냉방"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량수열_냉방") = value
            End If
        End Set
    End Property
    Property 면적당생산량수열_급탕() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량수열_급탕
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량수열_급탕"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량수열_급탕") = value
            End If
        End Set
    End Property

    Property 면적당생산량지열() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량지열
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량지열"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량지열") = value
            End If
        End Set
    End Property
    Property 면적당생산량지열_난방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량지열_난방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량지열_난방"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량지열_난방") = value
            End If
        End Set
    End Property
    Property 면적당생산량지열_냉방() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량지열_냉방
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량지열_냉방"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량지열_냉방") = value
            End If
        End Set
    End Property
    Property 면적당생산량지열_급탕() As Decimal
        Get
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                'MsgBox(ErrMsg)
                Return 0
            Else
                If MIdx = 0 Then   '//0월이면 모든월의 합계를 반환한다.
                    Dim Res As Decimal = 0
                    For i As Short = 1 To 12
                        Res += Result.생산E(i).면적당생산량지열_급탕
                    Next
                    Return Res
                Else
                    Return TOSG(DR(0)("면적당생산량지열_급탕"))
                End If
            End If
        End Get
        Set(ByVal value As Decimal)
            Dim DR() As DSR.생산에너지Row = CType(DSETR.생산에너지.Select("mon='" & Mon & "'"), DSR.생산에너지Row())
            If DR.GetUpperBound(0) = -1 Then
                MsgBox(ErrMsg)
            Else
                DR(0)("면적당생산량지열_급탕") = value
            End If
        End Set
    End Property
End Class

