Public Class C에너지요구량OD

    Dim Midx As Integer
    Public Mon As String
    Private ErrMsg As String = "에너지요구량 계산되지 않았습니다"
    Public Sub New(Optional ByVal pmIdx As Integer = 0)
        Mon = "M" & Format(pmIdx, "00")
        Me.Midx = pmIdx
    End Sub

    ReadOnly Property 요구량() As Decimal
        Get
            If Midx = 0 Then   '//누적데이터
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).요구량
                Next
                Return R
            Else
                Return 난방요구량 + 냉방요구량 + 조명요구량 + 급탕요구량
            End If
        End Get
    End Property
    ReadOnly Property 면적당요구량() As Decimal
        Get
            If Midx = 0 Then   '//누적데이터
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).면적당요구량
                Next
                Return R
            Else
                Return 난방면적 + 냉방면적 + 조명면적 + 급탕면적
            End If
        End Get
    End Property

#Region "난방요구량"
    ReadOnly Property 난방요구량() As Decimal
        Get
            If Midx = 0 Then   '//누적데이터
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).난방요구량
                Next
                Return R
            Else
                Return Me.난방열 + Me.난방공조
            End If
        End Get
    End Property
    ReadOnly Property 난방열() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E분석(i).난방에너지요구량열
                Next
                Return R
            Else
                Return Result1o.E분석(Midx).난방에너지요구량열
            End If
        End Get
    End Property
    ReadOnly Property 난방공조() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E분석(i).난방에너지요구량공조환기
                Next
                Return R
            Else
                Return Result1o.E분석(Midx).난방에너지요구량공조환기
            End If
        End Get
    End Property
    ReadOnly Property 난방면적() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).난방면적
                Next
                Return R
            Else
                If Result1o.사용면적.H = 0 Then
                    Return 0
                Else
                    Return Me.난방요구량 / Result1o.사용면적.H
                End If
            End If
        End Get
    End Property
#End Region

#Region "냉방요구량"
    ReadOnly Property 냉방요구량() As Decimal
        Get
            If Midx = 0 Then   '//누적데이터
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).냉방요구량
                Next
                Return R
            Else
                Return Me.냉방열 + Me.냉방공조
            End If
        End Get
    End Property
    ReadOnly Property 냉방열() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E분석(i).냉방에너지요구량열
                Next
                Return R
            Else
                Return Result1o.E분석(Midx).냉방에너지요구량열
            End If
        End Get
    End Property
    ReadOnly Property 냉방공조() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E분석(i).냉방에너지요구량공조환기
                Next
                Return R
            Else
                Return Result1o.E분석(Midx).냉방에너지요구량공조환기
            End If
        End Get
    End Property
    ReadOnly Property 냉방면적() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).냉방면적
                Next
                Return R
            Else
                If Result1o.사용면적.C = 0 Then
                    Return 0
                Else
                    Return Me.냉방요구량 / Result1o.사용면적.C
                End If
            End If
        End Get
    End Property
#End Region

#Region "조명요구량"
    ReadOnly Property 조명요구량() As Decimal
        Get
            If Midx = 0 Then   '//누적데이터
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).조명요구량
                Next
                Return R
            Else
                Return Result1o.E분석(Midx).조명에너지요구량
            End If
        End Get
    End Property
    ReadOnly Property 조명면적() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).조명면적
                Next
                Return R
            Else
                If Result1o.사용면적.L = 0 Then
                    Return 0
                Else
                    Return Me.조명요구량 / Result1o.사용면적.L
                End If
            End If
        End Get
    End Property
#End Region

#Region "급탕요구량"
    ReadOnly Property 급탕요구량() As Decimal
        Get
            If Midx = 0 Then   '//누적데이터
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).급탕요구량
                Next
                Return R
            Else
                Return Result1o.E분석(Midx).급탕에너지요구량
            End If
        End Get
    End Property
    ReadOnly Property 급탕면적() As Decimal
        Get            '//월별 에너지분석에서 난방요구량
            If Midx = 0 Then
                Dim R As Decimal = 0
                For i As Integer = 1 To 12
                    R += Result1o.E요구량(i).급탕면적
                Next
                Return R
            Else
                If Result1o.사용면적.W = 0 Then
                    Return 0
                Else
                    Return Me.급탕요구량 / Result1o.사용면적.W
                End If
            End If
        End Get
    End Property
#End Region

End Class
