Public Class CSummary
    Public Event Message(ByVal Msg As String, pval As Integer, pmin As Integer, pmax As Integer)    '//메세지표시
    Private DSETR As DSR
    Private Result As CResult
    Public Sub New(ByRef pdsetr As DSR, ByRef presult As CResult)
        DSETR = pdsetr
        Result = presult
    End Sub

    ''' <summary>
    ''' 모든 집계데이터를 갱신합니다.
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub All()

        ''TMon()
        RaiseEvent Message("최종데이터 집계중..." + vbCrLf + "잠시만기다려주세요", 1, 0, 1)

        For Each Dr As C에너지분석 In Result.E분석 '//12달치의 각존들의 데이터를 가지고 합계내역을 추린다. '//LoadOfZone 에서 계산완료한다.
            Dr.Calc()
        Next
        Result.최대부하.Calc_Summary()    '//최대냉난방부하(합계-zone='00') 계산
        'Result.생산E(0).Calc_Summary()    '//합계필드(M00)에데이터를 누적합니다.
        Result.일차E소요량(0).Calc_Summary()   '//1차소요량의 합계데이터를 계산
        Result.E소요량(0).Calc_Summary()   '//1차소요량의 합계데이터를 계산

        'TReqUse_M01M12() '//이것들은 현재 사용하지 않고있다.
        'TReqUse_M00()    '//현재 사용하지않고있따.

        Me.Make_ResultSheet()    '//최종결과를 보여주는 시트를 작성한다.
        DSETR.AcceptChanges()   '//변경된모든내용을 적용함
    End Sub

#Region "미사용개체"

    ''' <summary>
    ''' 1월부터 10월까지 집계데이터를 계산한다.
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub TReqUse_M01M12()
        For i As Short = 1 To 12
            'MOn = "M" & Format(i, "00")
            'Dim DR() As DSR.TReqUseRow = CType(DSETR.TReqUse.Select("", "code"), DSR.TReqUseRow())


            ''////////////////////////////////////
            ''         연간 Co2 배출량
            ''////////////////////////////////////

            ''조명/환기에너지소요량
            'DR(56 - 1)(MOn) = CType(DSETR.월별에너지분석.Select("월='" & MOn & "' and 존='00'")(0), DSR.월별에너지분석Row).조명요구량
            'DR(57 - 1)(MOn) = CType(DSETR.월별에너지분석.Select("월='" & MOn & "' and 존='00'")(0), DSR.월별에너지분석Row).환기요구량

            ''//SUMProduct 계산
            'Dim Acc1 as decimal = 0
            'Dim Acc2 as decimal = 0
            'For j As Short = 41 To 57
            '    Acc1 += Ru(j, MOn) * Ru(j, "sign")
            'Next
            'For j As Short = 58 To 59
            '    Acc2 += Ru(j, MOn) * Ru(j, "sign")
            'Next
            'Ru(ResultRow.CO2_연간배출량, MOn) = Acc1 - Acc2 '//최상단 합계(연가Co2배출량

            ''//Excel 67번줄데이터가 필요하므로 먼저계산한다..해당데이터는 마지막(64번줄에 할당함)
            ''//(I95+I96)/(I76+I82+I88+I90+I92)*$C$76
            'Ru(64, MOn) = (Ru(58, MOn) + Ru(59, MOn)) / (Ru(45, MOn) + Ru(50, MOn) + Ru(55, MOn) + Ru(56, MOn) + Ru(57, MOn)) * Ru(45, "sign")

            ''//난방에너지소요량(계수(sign)* Sumproduct)
            'Dim ACc_Nan as decimal = 0
            'For j As Short = 41 To 45
            '    ACc_Nan += CSng(DR(j - 1)(MOn)) * CSng(DR(j - 1)("sign"))
            'Next

            'Dim ACc_Naeng as decimal = 0
            'For j As Short = 46 To 50
            '    ACc_Naeng += CSng(DR(j - 1)(MOn)) * CSng(DR(j - 1)("sign"))
            'Next

            'Dim ACc_KUb as decimal = 0
            'For j As Short = 51 To 55
            '    ACc_KUb += CSng(DR(j - 1)(MOn)) * CSng(DR(j - 1)("sign"))
            'Next


            ''//67>64
            ''IF(csng(ru(7,"00"))=0,0,(ACc_Nan-ru(45,mon)*ru(64,mon))/$H$15)+IF($H$20=0,0,(SUMPRODUCT($C$78:$C$82,I78:I82)-I82*I67)/$H$20)+IF($H$26=0,0,(SUMPRODUCT($C$84:$C$88,I84:I88)-I88*I67)/$H$26)+IF($H$23=0,0,($C$90*I90-I90*I67)/$H$23)+IF($H$27=0,0,($C$92*I92-I92*I67)/$H$27)
            ''IF(csng(ru(7))=0,0,(ACc_Nan-ru(45,mon)*ru(64,mon))/ru(7))+IF(ru(12)=0,0,(acc_naeng-ru(50,mon)*ru(64,mon))/ru(12))+IF(ru(18)=0,0,(acc_kub-ru(55,mon)*ru(64,mon))/ru(18))+IF(ru(15)=0,0,(ru(56,"sign")*ru(56,mon)-ru(56,mon)*ru(64,mon))/ru(15))+IF(ru(19)=0,0,(ru(57,"sign")*ru(57,mon)-ru(57,mon)*ru(64,mon))/ru(19))

            ''//단위면적당Co2배출량)
            'If Ru(ResultRow.요구량_난방_사용면적) = 0 Then
            '    Ru(ResultRow.CO2_단위면적당배출량, MOn) = 0
            'Else
            '    '(ACc_Nan-ru(45,mon)*ru(64,mon))/ru(7))+IF(ru(12)=0,0,(acc_naeng-ru(50,mon)*ru(64,mon))/ru(12))+IF(ru(18)=0,0,(acc_kub-ru(55,mon)*ru(64,mon))/ru(18))+IF(ru(15)=0,0,(ru(56,"sign")*ru(56,mon)-ru(56,mon)*ru(64,mon))/ru(15))+IF(ru(19)=0,0,(ru(57,"sign")*ru(57,mon)-ru(57,mon)*ru(64,mon))/ru(19)
            '    Ru(ResultRow.CO2_단위면적당배출량, MOn) = (ACc_Nan - Ru(45, MOn) * Ru(64, MOn)) / Ru(7) + CSng(IIf(Ru(12) = 0, 0, (ACc_Naeng - Ru(50, MOn) * Ru(64, MOn)) / Ru(12))) + CSng(IIf(Ru(18) = 0, 0, (ACc_KUb - Ru(55, MOn) * Ru(64, MOn)) / Ru(18))) + CSng(IIf(Ru(15) = 0, 0, (Ru(56, "sign") * Ru(56, MOn) - Ru(56, MOn) * Ru(64, MOn)) / Ru(15))) + CSng(IIf(Ru(19) = 0, 0, (Ru(57, "sign") * Ru(57, MOn) - Ru(57, MOn) * Ru(64, MOn)) / Ru(19)))
            'End If
        Next
    End Sub

    ''' <summary>
    ''' 에너지요구량및소요량 테이블의 M00(합계)를 누적(M01~M12)로 채웁니다. 그렇지않은건 이후에 합계프로시져별도로 생성함
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub TReqUse_M00()
        ''//LT(LineType 이 SL  Sum Line 인경우가져와서 m00 = m01~m12 한다
        'Dim DR() As DSR.TReqUseRow = CType(DSETR.TReqUse.Select("", "code"), DSR.TReqUseRow())
        'For Each Drs As DSR.TReqUseRow In DSETR.TReqUse.Select("lt='SL'")
        '    Drs.M00 = Drs.M01 + Drs.M02 + Drs.M03 + Drs.M04 + Drs.M05 + Drs.M06 + Drs.M07 + Drs.M08 + Drs.M09 + Drs.M10 + Drs.M11 + Drs.M12
        'Next

        ''//커스텀 합계필드 계산

        ''자주사용되는 SUM(1~12)를 미리 계산해둔다
        'Dim L45, L50, L55, L56, L57, L22, L27, L31, L33, L37 as decimal : Dim Drow As DSR.TReqUseRow
        'Drow = CType(DSETR.TReqUse.Rows(45 - 1), DSR.TReqUseRow)
        'L45 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(50 - 1), DSR.TReqUseRow)
        'L50 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(55 - 1), DSR.TReqUseRow)
        'L55 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(56 - 1), DSR.TReqUseRow)
        'L56 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(57 - 1), DSR.TReqUseRow)
        'L57 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(22 - 1), DSR.TReqUseRow)
        'L22 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(27 - 1), DSR.TReqUseRow)
        'L27 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(31 - 1), DSR.TReqUseRow)
        'L31 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(33 - 1), DSR.TReqUseRow)
        'L33 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        'Drow = CType(DSETR.TReqUse.Rows(37 - 1), DSR.TReqUseRow)
        'L37 = Drow.M01 + Drow.M02 + Drow.M03 + Drow.M04 + Drow.M05 + Drow.M06 + Drow.M07 + Drow.M08 + Drow.M09 + Drow.M10 + Drow.M11 + Drow.M12

        ''//실제 데이터 집계
        'Drow = CType(DSETR.TReqUse.Rows(45 - 1), DSR.TReqUseRow)
        'Drow.M00 = L45 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L45
        ''If (L45 + L50 + L55 + L56 + L57) <> 0 Then Drow.M00 = L45 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L45


        'Drow = CType(DSETR.TReqUse.Rows(50 - 1), DSR.TReqUseRow)
        'Drow.M00 = L50 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L50 '
        ''If (L45 + L50 + L55 + L56 + L57) <> 0 Then Drow.M00 = L50 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L50

        'Drow = CType(DSETR.TReqUse.Rows(55 - 1), DSR.TReqUseRow)
        'Drow.M00 = L55 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L55
        ''If (L45 + L50 + L55 + L56 + L57) <> 0 Then Drow.M00 = L55 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L55

        'Drow = CType(DSETR.TReqUse.Rows(56 - 1), DSR.TReqUseRow)
        'Drow.M00 = L56 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L56
        ''If (L45 + L50 + L55 + L56 + L57) <> 0 Then Drow.M00 = L56 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L56

        'Drow = CType(DSETR.TReqUse.Rows(57 - 1), DSR.TReqUseRow)
        'Drow.M00 = L57 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L57
        ''If (L45 + L50 + L55 + L56 + L57) <> 0 Then Drow.M00 = L57 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L57

        ''//
        'Drow = CType(DSETR.TReqUse.Rows(22 - 1), DSR.TReqUseRow)
        '' If (L45 + L50 + L55 + L56 + L57) <> 0 Then
        'Drow.M00 = L22 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L45
        'Drow.COLG = L22 - (DR(58 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L45
        ''    End If

        'Drow = CType(DSETR.TReqUse.Rows(27 - 1), DSR.TReqUseRow)
        '' If (L45 + L50 + L55 + L56 + L57) <> 0 Then
        'Drow.M00 = L27 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L50
        'Drow.COLG = L27 - (DR(58 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L50
        '' End If

        'Drow = CType(DSETR.TReqUse.Rows(31 - 1), DSR.TReqUseRow)
        ''  If (L45 + L50 + L55 + L56 + L57) <> 0 Then
        'Drow.M00 = L31 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L56
        'Drow.COLG = L31 - (DR(58 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L56
        ''        End If


        'Drow = CType(DSETR.TReqUse.Rows(33 - 1), DSR.TReqUseRow)
        ''If (L45 + L50 + L55 + L56 + L57) <> 0 Then
        'Drow.M00 = L33 - (DR(58 - 1).M00 + DR(59 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L55
        'Drow.COLG = L33 - (DR(58 - 1).M00) / (L45 + L50 + L55 + L56 + L57) * L55
        '' End If

        ''//
        'Drow = CType(DSETR.TReqUse.Rows(20 - 1), DSR.TReqUseRow)
        'Drow.M00 = DR(22 - 1).M00 + DR(27 - 1).M00 + DR(31 - 1).M00 + DR(33 - 1).M00 + DR(37 - 1).M00

        ''//
        'Drow = CType(DSETR.TReqUse.Rows(26 - 1), DSR.TReqUseRow)
        'Drow.M00 = CSng(IIf(DR(7 - 1).M00 = 0, 0, DR(22 - 1).M00 / DR(7 - 1).M00))

        'Drow = CType(DSETR.TReqUse.Rows(30 - 1), DSR.TReqUseRow)
        'Drow.M00 = CSng(IIf(DR(12 - 1).M00 = 0, 0, DR(27 - 1).M00 / DR(12 - 1).M00))

        'Drow = CType(DSETR.TReqUse.Rows(32 - 1), DSR.TReqUseRow)
        'Drow.M00 = CSng(IIf(DR(15 - 1).M00 = 0, 0, DR(31 - 1).M00 / DR(15 - 1).M00))

        'Drow = CType(DSETR.TReqUse.Rows(36 - 1), DSR.TReqUseRow)
        'Drow.M00 = CSng(IIf(DR(18 - 1).M00 = 0, 0, DR(33 - 1).M00 / DR(18 - 1).M00))


        ''=SUM(I58:T58)-(H95+H96)/(SUM(I76:T76)+SUM(I82:T82)+SUM(I88:T88)+SUM(I90:T90)+SUM(I92:T92))*SUM(I92:T92)
        ''=L37-(ru(58)+ru(59))/(L45+L50+L55+L56+L57)*L57
        'Drow = CType(DSETR.TReqUse.Rows(37 - 1), DSR.TReqUseRow)    '//환기에너지소요량(X)
        ''    If (L45 + L50 + L55 + L56 + L57) <> 0 Then
        'Drow.M00 = L37 - (Ru(58) + Ru(59)) / (L45 + L50 + L55 + L56 + L57) * L57
        'Drow.COLG = L37 - (Ru(58)) / (L45 + L50 + L55 + L56 + L57) * L57
        ''    End If


        'Drow = CType(DSETR.TReqUse.Rows(38 - 1), DSR.TReqUseRow)    '//환기에너지 단위면적당 소요량
        'Drow.M00 = CSng(IIf(Ru(19) = 0, 0, Ru(37) / Ru(19)))

        ''//
        'Drow = CType(DSETR.TReqUse.Rows(21 - 1), DSR.TReqUseRow)
        'Drow.M00 = DR(26 - 1).M00 + DR(30 - 1).M00 + DR(32 - 1).M00 + DR(36 - 1).M00 + DR(38 - 1).M00

    End Sub


#End Region

    Public Sub Make_ResultSheet()
        Dim idx As Integer

        '//에너지요구량
        DSETR.TReqUse.Clear()
        DSETR.TReqUse.AcceptChanges()

        Dim Array As New ArrayList

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).요구량)
        Next
        Set_ReqUseRow("100", "에너지요구량", "[kWh]", "Qb", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).면적당요구량)
        Next
        Set_ReqUseRow("100", "단위면적당 에너지 요구량", "[kWh/m²]", "Σ(Qb / Ab)", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).난방요구량)
        Next
        Set_ReqUseRow("110", "난방에너지 요구량", "[kWh]", "QH,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).난방열)
        Next
        Set_ReqUseRow("110", "난방에너지 요구량(열)", "[kWh]", "Qh,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).난방공조)
        Next
        Set_ReqUseRow("110", "난방에너지 요구량(공조,환기)", "[kWh]", "Qh*,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).난방면적)
        Next
        Set_ReqUseRow("110", "단위면적당 요구량", "[kWh/m²]", "QH,b / AH", "=", Array, "N1")
        Set_ReqUseRow("110", "사용면적(난방)", "[m²]", "AH", "=", Result.사용면적.H, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).냉방요구량)
        Next
        Set_ReqUseRow("110", "냉방에너지 요구량", "[kWh]", "QC,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).냉방열)
        Next
        Set_ReqUseRow("110", "냉방에너지 요구량(열)", "[kWh]", "Qc,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).냉방공조)
        Next
        Set_ReqUseRow("110", "냉방에너지 요구량(공조,환기)", "[kWh]", "Qc*,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).냉방면적)
        Next
        Set_ReqUseRow("110", "단위면적당 요구량", "[kWh/m²]", "QC,b / AC", "=", Array, "N1")
        Set_ReqUseRow("110", "사용면적(냉방)", "[m²]", "AC", "=", Result.사용면적.C, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).조명요구량)
        Next
        Set_ReqUseRow("110", "조명에너지 요구량", "[kWh]", "QL,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).조명면적)
        Next
        Set_ReqUseRow("110", "단위면적당 요구량", "[kWh/m²]", "QL,b / AL", "=", Array, "N1")
        Set_ReqUseRow("110", "사용면적(조명)", "[m²]", "AL", "=", Result.사용면적.L, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).급탕요구량)
        Next
        Set_ReqUseRow("110", "급탕에너지 요구량", "[kWh]", "QW,b", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E요구량(i).급탕면적)
        Next
        Set_ReqUseRow("110", "단위면적당 요구량", "[kWh/m²]", "QW,b / AW", "=", Array, "N1")
        Set_ReqUseRow("110", "사용면적(급탕)", "[m²]", "AW", "=", Result.사용면적.W, "N1")
        Set_ReqUseRow("110", "사용면적(환기)", "[m²]", "AV", "=", Result.사용면적.V, "N1")

        '//에너지소요량
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).소요량)
        Next
        Set_ReqUseRow("200", "에너지소요량", "[kWh]", "Qf", "", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).면적소요량)
        Next
        Set_ReqUseRow("200", "단위면적당 에너지 소요량", "[kWh/m²]", "Σ(Qf / Ab)", "", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).난방S)
        Next
        Set_ReqUseRow("210", "난방에너지 소요량", "[kWh]", "QH,f", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).난방)
        Next
        Set_ReqUseRow("210", "난방에너지 소요량", "[kWh]", "Qh,f", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).난방보조)
        Next
        Set_ReqUseRow("210", "난방보조에너지 소요량", "[kWh]", "Qh,aux", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).난방면적)
        Next
        Set_ReqUseRow("210", "단위면적당 소요량", "[kWh/m²]", "QH,f / AH", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).냉방S)
        Next
        Set_ReqUseRow("210", "냉방에너지 소요량", "[kWh]", "QC,f", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).냉방)
        Next
        Set_ReqUseRow("210", "냉방에너지 소요량", "[kWh]", "Qc,f", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).냉방보조)
        Next
        Set_ReqUseRow("210", "냉방보조에너지 소요량", "[kWh]", "Qc,aux", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).냉방면적)
        Next
        Set_ReqUseRow("210", "단위면적당 소요량", "[kWh/m²]", "QC,f / AC", "=", Array, "N1")


        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).조명S)
        Next
        Set_ReqUseRow("210", "조명에너지 소요량", "[kWh]", "QL,f", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).조명면적)
        Next
        Set_ReqUseRow("210", "단위면적당 소요량", "[kWh/m²]", "QL,f / AL", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).급탕S)
        Next
        Set_ReqUseRow("210", "급탕에너지 소요량", "[kWh]", "QW,f", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).급탕)
        Next
        Set_ReqUseRow("210", "급탕에너지 소요량", "[kWh]", "Qw,f", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).급탕보조)
        Next
        Set_ReqUseRow("210", "급탕보조에너지 소요량", "[kWh]", "Qw,aux", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).급탕면적)
        Next
        Set_ReqUseRow("210", "단위면적당 소요량", "[kWh/m²]", "QW,f / AW", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).환기S)
        Next
        Set_ReqUseRow("210", "환기에너지 소요량", "[kWh]", "QV,aux", "=", Array)    '//36
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.E소요량(i).환기면적)
        Next
        Set_ReqUseRow("210", "단위면적당 소요량", "[kWh/m²]", "QV.aux / AV", "=", Array, "N1")

        '//1차에너지 소요량(10-02 추가)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).소요량)
        Next
        Set_ReqUseRow("300", "1차에너지 소요량", "[kWh]", "", "", Array)   '//38
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).단위면적)
        Next
        Set_ReqUseRow("300", "단위면적당 1차에너지 소요량", "[kWh/m²]", "", "", Array, "N1")    '//39

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방소요량)
        Next
        Set_ReqUseRow("310", "난방 1차에너지 소요량", "", "", "", Array)  '//40
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방등유)
        Next
        Set_ReqUseRow("310", "난방유(등유) 소요량", "[kWh]", "1.1", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방LNG)
        Next
        Set_ReqUseRow("310", "천연가스(LNG) 소요량", "[kWh]", "1.1", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방LPG)
        Next
        Set_ReqUseRow("310", "액화가스(LPG) 소요량", "[kWh]", "1.1", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방지역)
        Next
        Set_ReqUseRow("310", "지역난방열료 소요량", "[kWh]", "0.728", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방전력)
        Next
        Set_ReqUseRow("310", "전력 소요량", "[kWh]", "2.75", "=", Array) '//45

        'Array.Clear() '//--펠렛 100727
        'For i As Integer = 0 To 12
        '    Array.Add(Result.일차E소요량(i).난방펠렛)
        'Next
        'Set_ReqUseRow("310", "펠렛보일러 소요량", "[kWh]", "1.1", "=", Array)


        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).난방면적)
        Next
        Set_ReqUseRow("310", "단위면적당 1차에너지 소요량", "[kWh/m2]", "", "=", Array, "N1")  '//46

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방소요량)
        Next
        Set_ReqUseRow("310", "냉방 1차에너지 소요량", "", "", "", Array)  '//47
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방등유)
        Next
        Set_ReqUseRow("310", "난방유(등유) 소요량", "[kWh]", "1.1", "=", Array)  '//48
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방LNG)
        Next
        Set_ReqUseRow("310", "천연가스(LNG) 소요량", "[kWh]", "1.1", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방LPG)
        Next
        Set_ReqUseRow("310", "액화가스(LPG) 소요량", "[kWh]", "1.1", "=", Array) '//50
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방지역난방열)
        Next
        Set_ReqUseRow("310", "지역난방열 소요량", "[kWh]", "0.728", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방지역냉방열)
        Next
        Set_ReqUseRow("310", "지역냉방열 소요량", "[kWh]", Result.E변환계수.지역냉방.ToString("N3"), "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방전력)
        Next
        Set_ReqUseRow("310", "전력 소요량", "[kWh]", "2.75", "=", Array) '//52

        'Array.Clear() '//--펠렛 100727
        'For i As Integer = 0 To 12
        '    Array.Add(Result.일차E소요량(i).냉방펠렛)
        'Next
        'Set_ReqUseRow("310", "펠렛보일러 소요량", "[kWh]", "1.1", "=", Array)


        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).냉방면적)
        Next
        Set_ReqUseRow("310", "단위면적당 1차에너지 소요량", "[kWh/m2]", "", "=", Array, "N1")  '//53


        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕소요량)
        Next
        Set_ReqUseRow("310", "급탕 1차에너지 소요량", "", "", "", Array)  '//54
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕등유)
        Next
        Set_ReqUseRow("310", "난방유(등유) 소요량", "[kWh]", "1.1", "=", Array)  '//55
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕LNG)
        Next
        Set_ReqUseRow("310", "천연가스(LNG) 소요량", "[kWh]", "1.1", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕LPG)
        Next
        Set_ReqUseRow("310", "액화가스(LPG) 소요량", "[kWh]", "1.1", "=", Array) '//57
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕지역)
        Next
        Set_ReqUseRow("310", "지역난방열 소요량", "[kWh]", "0.728", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕전력)
        Next
        Set_ReqUseRow("310", "전력 소요량", "[kWh]", "2.75", "=", Array) '//59

        'Array.Clear() '//--펠렛 100727
        'For i As Integer = 0 To 12
        '    Array.Add(Result.일차E소요량(i).급탕펠렛)
        'Next
        'Set_ReqUseRow("310", "펠렛보일러 소요량", "[kWh]", "1.1", "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).급탕면적)
        Next

        Set_ReqUseRow("310", "단위면적당 1차에너지 소요량", "[kWh/m2]", "", "=", Array, "N1")  '//60

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).조명소요량)
        Next
        Set_ReqUseRow("310", "조명 1차에너지 소요량", "", "", "", Array)  '//61
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).조명전력)
        Next
        Set_ReqUseRow("310", "전력 소요량", "[kWh]", "2.75", "=", Array) '//62
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).조명면적)
        Next

        Set_ReqUseRow("310", "단위면적당 1차에너지 소요량", "[kWh/m2]", "", "=", Array, "N1")  '//63

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).환기소요량)
        Next
        Set_ReqUseRow("310", "환기 1차에너지 소요량", "", "", "", Array)  '//64
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).환기전력)
        Next
        Set_ReqUseRow("310", "전력 소요량", "[kWh]", "2.75", "=", Array) '//65
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.일차E소요량(i).환기면적)
        Next

        Set_ReqUseRow("310", "단위면적당 1차에너지 소요량", "[kWh/m2]", "", "=", Array, "N1")  '//66

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).태양광전력생산량)
        Next
        Set_ReqUseRow("310", "전기에너지 생산량(태양광)", "[kWh]", CStr(Result.E변환계수.전력), "=", Array)    '//67
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).풍력전력생산량)
        Next
        Set_ReqUseRow("310", "전기에너지 생산량(풍력)", "[kWh]", CStr(Result.E변환계수.전력), "=", Array)    '//67
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).열병합전력생산량)
        Next
        Set_ReqUseRow("310", "전기에너지 생산량(열병합)", "[kWh]", CStr(Result.E변환계수.전력), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).태양열생산량)
        Next
        Set_ReqUseRow("310", "열에너지 생산량(태양열)", "[kWh]", "", "=", Array)  '//69
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).지열생산량)
        Next
        Set_ReqUseRow("310", "열에너지 생산량(지열)", "[kWh]", "", "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).수열생산량)
        Next
        Set_ReqUseRow("310", "열에너지 생산량(수열)", "[kWh]", "", "=", Array)

        '//열병합추가 230804
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).신재생열병합열생산량)
        Next
        Set_ReqUseRow("310", "열에너지 생산량(열병합)", "[kWh]", "", "=", Array)


        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).면적당생산량태양열)
        Next
        Set_ReqUseRow("310", "단위면적당 생산량(태양열)", "[kWh]", "", "=", Array, "N1")    '//71

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).면적당생산량지열)
        Next
        Set_ReqUseRow("310", "단위면적당 생산량(지열)", "[kWh]", "", "=", Array, "N1")  '//72

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).면적당생산량수열)
        Next
        Set_ReqUseRow("310", "단위면적당 생산량(수열)", "[kWh]", "", "=", Array, "N1")  '//72

        '//열병합추가 230804
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.생산E(i).신재생면적당열생산량)
        Next
        Set_ReqUseRow("310", "단위면적당 생산량(열병합)", "[kWh]", "", "=", Array, "N1")  '//72


        '//CO2배출량
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).발생량)
        Next
        Set_ReqUseRow("400", "연간 CO2 배출량", "[kg CO2]", "", "", Array)  '//73
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).단위면적)
        Next

        idx = Set_ReqUseRow("400", "단위면적당 CO2 배출량", "[kg CO2/m²]", "", "", Array, "N1")    '//74
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방발생량)
        Next
        idx = Set_ReqUseRow("410", "난방 CO2 발생량", "", "", "", Array)  '//75
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방등유)
        Next
        idx = Set_ReqUseRow("410", "난방유(등유) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.등유), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방LNG)
        Next
        Set_ReqUseRow("410", "천연가스(LNG) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.LNG), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방LPG)
        Next
        Set_ReqUseRow("410", "액화가스(LPG) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.LPG), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방지역)
        Next
        Set_ReqUseRow("410", "지역난방열 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.지역난방), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방전력)
        Next
        Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array)

        'Array.Clear() '//펠렛
        'For i As Integer = 0 To 12
        '    Array.Add(Result.Co2발생량(i).난방펠렛)
        'Next
        'Set_ReqUseRow("410", "펠렛 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.펠렛), "=", Array)

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).난방면적)
        Next

        idx = Set_ReqUseRow("410", "단위면적당 CO2 발생량", "[kg CO2]", "", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방발생량)
        Next
        Set_ReqUseRow("410", "냉방 CO2 발생량", "", "", "", Array)  '//82
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방등유)
        Next
        Set_ReqUseRow("410", "난방유(등유) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.등유), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방LNG)
        Next
        Set_ReqUseRow("410", "천연가스(LNG) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.LNG), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방LPG)
        Next
        Set_ReqUseRow("410", "액화가스(LPG) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.LPG), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방지역난방열)
        Next
        Set_ReqUseRow("410", "지역난방열 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.지역난방), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방지역냉방열)
        Next
        Set_ReqUseRow("410", "지역냉방열 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.지역냉방), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방전력)
        Next
        Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array)
        'Array.Clear() '//낸ㅇ방펠렛
        'For i As Integer = 0 To 12
        '    Array.Add(Result.Co2발생량(i).냉방펠렛)
        'Next
        'Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.펠렛), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).냉방면적)
        Next

        Set_ReqUseRow("410", "단위면적당 CO2 발생량", "[kg CO2]", "", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕발생량)
        Next
        Set_ReqUseRow("410", "급탕 CO2 발생량", "", "", "", Array)  '//89
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕등유)
        Next
        Set_ReqUseRow("410", "난방유(등유) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.등유), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕LNG)
        Next
        Set_ReqUseRow("410", "천연가스(LNG) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.LNG), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕LPG)
        Next
        Set_ReqUseRow("410", "액화가스(LPG) CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.LPG), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕지역)
        Next
        Set_ReqUseRow("410", "지역난방열 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.지역난방), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕전력)
        Next
        Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array)
        'Array.Clear() '//급탕펠렛
        'For i As Integer = 0 To 12
        '    Array.Add(Result.Co2발생량(i).급탕펠렛)
        'Next
        'Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.펠렛), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).급탕면적)
        Next

        Set_ReqUseRow("410", "단위면적당 CO2 발생량", "[kg CO2]", "", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).조명발생량)
        Next
        Set_ReqUseRow("410", "조명 CO2 발생량", "", "", "", Array)  '//96
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).조명전력)
        Next
        Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).조명면적)
        Next

        Set_ReqUseRow("410", "단위면적당 CO2 발생량", "[kg CO2]", "", "=", Array, "N1")

        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).환기발생량)
        Next
        Set_ReqUseRow("410", "환기 CO2 발생량", "", "", "", Array)  '//99
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).환기전력)
        Next
        Set_ReqUseRow("410", "전력 CO2 발생량", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array)
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).환기면적)
        Next

        Set_ReqUseRow("410", "단위면적당 CO2 발생량", "[kg CO2]", "", "=", Array, "N1")

        '//CO2저감량
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).저감량태양광)
        Next
        Set_ReqUseRow("410", "전력 CO2 저감량(태양광)", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array) '//102
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).저감량풍력)
        Next
        Set_ReqUseRow("410", "전력 CO2 저감량(풍력)", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array) '//102
        Array.Clear()
        For i As Integer = 0 To 12
            Array.Add(Result.Co2발생량(i).저감량열병합)
        Next
        Set_ReqUseRow("410", "전력 CO2 저감량(열병합)", "[kg CO2]", CStr(Result.Co2배출계수.전력), "=", Array) '//103
        DSETR.AcceptChanges()

    End Sub

    Private Function Set_ReqUseRow(ByVal GRP As String, ByVal desc As String, ByVal unit As String, ByVal sign As String, ByVal eq As String, ByVal Value As ArrayList, Optional ByVal F As String = "N0") As Integer
        Dim DR As DSR.TReqUseRow : DR = DSETR.TReqUse.NewTReqUseRow

        Dim idx As Integer = DSETR.TReqUse.Rows.Count + 1
        DR.Code = Format(idx, "000")
        DR.GRP = GRP  '//그룹 출력할떄 그룹으로 뽑는다.

        If System.Diagnostics.Debugger.IsAttached Then
            DR.Desc = "(" + DR.GRP + "-" + DR.Code + ")" + desc  '//설명
        Else
            DR.Desc = desc  '//설명
        End If

        'DR.Desc = desc  '//설명
        DR.UNIT = unit  '//단위
        DR.SIGN = sign    '//기호
        DR.EQ = eq    '//등호 =
        DR.M00 = TOSG(Value.Item(0))
        DR.M01 = TOSG(Value.Item(1))
        DR.M02 = TOSG(Value.Item(2))
        DR.M03 = TOSG(Value.Item(3))
        DR.M04 = TOSG(Value.Item(4))
        DR.M05 = TOSG(Value.Item(5))
        DR.M06 = TOSG(Value.Item(6))
        DR.M07 = TOSG(Value.Item(7))
        DR.M08 = TOSG(Value.Item(8))
        DR.M09 = TOSG(Value.Item(9))
        DR.M10 = TOSG(Value.Item(10))
        DR.M11 = TOSG(Value.Item(11))
        DR.M12 = TOSG(Value.Item(12))
        DR.F = F
        DSETR.TReqUse.AddTReqUseRow(DR)
        Return idx
    End Function
    Private Sub Set_ReqUseRow(ByVal GRP As String, ByVal desc As String, ByVal unit As String, ByVal sign As String, ByVal eq As String, ByVal Value As Decimal, Optional ByVal F As String = "N0")
        Dim DR As DSR.TReqUseRow : DR = DSETR.TReqUse.NewTReqUseRow

        DR.Code = Format(DSETR.TReqUse.Rows.Count + 1, "000")
        DR.GRP = GRP  '//그룹 출력할떄 그룹으로 뽑는다.
        If System.Diagnostics.Debugger.IsAttached Then
            DR.Desc = "(" + DR.GRP + "-" + DR.Code + ")" + desc  '//설명
        Else
            DR.Desc = desc  '//설명
        End If

        DR.UNIT = unit  '//단위
        DR.SIGN = sign    '//기호
        DR.EQ = eq    '//등호 =
        DR.M00 = Value
        DR.F = F
        'DR.M01 = CSng(Value.Item(1))
        'DR.M02 = CSng(Value.Item(2))
        'DR.M03 = CSng(Value.Item(3))
        'DR.M04 = CSng(Value.Item(4))
        'DR.M05 = CSng(Value.Item(5))
        'DR.M06 = CSng(Value.Item(6))
        'DR.M07 = CSng(Value.Item(7))
        'DR.M08 = CSng(Value.Item(8))
        'DR.M09 = CSng(Value.Item(9))
        'DR.M10 = CSng(Value.Item(10))
        'DR.M11 = CSng(Value.Item(11))
        'DR.M12 = CSng(Value.Item(12))
        DSETR.TReqUse.AddTReqUseRow(DR)
    End Sub

End Class
