Public Class C최대냉난방부하 Private DSETR As DSR Public Sub New(ByRef pdsetr As DSR) '//존은초기화값을 가지고 생성한다. DSETR = pdsetr End Sub Public Function Item(Optional ByVal ZoneCode As String = "00") As Citem Return New Citem(DSETR, ZoneCode) End Function Public Sub Calc_Summary() '//Zone 이 00일떄만 계산된다 Dim a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 As Decimal a1 = 0 : a2 = 0 : a3 = 0 : a4 = 0 : a5 = 0 : a6 = 0 a7 = 0 : a8 = 0 : a9 = 0 : a10 = 0 Dim Exist As Boolean = False For Each Dr As DSR.최대냉난방부하Row In DSETR.최대냉난방부하.Select("Zone <> '00'", "Zone") If Exist = False Then Exist = True ' Dr.최대냉난방부하 = Dr.최대난방기기부하 + Dr.최대냉방기기부하 a1 += Dr.최대난방기기부하 a2 += Dr.최대난방실내부하 'a3 += Dr.난방최대가동시간 a4 += Dr.최대가열성능 a5 += Dr.최대냉방기기부하 a6 += Dr.최대냉방실내부하 'a7 += Dr.냉방최대가동시간 a8 += Dr.최대냉각성능 a9 += Dr.최대가습성능 a10 += Dr.공조풍량 Next If Exist = False Then MsgBox("각존별 계산이 되어있지않아서 값을 계산할 수 없습니다", MsgBoxStyle.Critical, "확인") Return End If Me.Item("00").최대난방기기부하 = a1 Me.Item("00").최대난방실내부하 = a2 Me.Item("00").일일난방최대가동시간 = a3 Me.Item("00").최대가열성능 = a4 Me.Item("00").최대냉방기기부하 = a5 Me.Item("00").최대냉방실내부하 = a6 Me.Item("00").일일냉방최대가동시간 = a7 Me.Item("00").최대냉각성능 = a8 Me.Item("00").최대가습성능 = a9 Me.Item("00").공조풍량 = a10 End Sub Public Class Citem Private Zone As String Dim ErrMsg As String = "최대냉난방부하가 계산되지 않았습니다" Private DSETR As DSR Public Sub New(ByRef pdsetr As DSR, Optional ByVal pZone As String = "00") '//존은초기화값을 가지고 생성한다. DSETR = pdsetr Zone = pZone End Sub ReadOnly Property 최대냉난방부하() As Decimal Get Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(Me.최대난방기기부하 + Me.최대냉방기기부하) End If End Get End Property Property 최대난방기기부하() As Decimal Get Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대난방기기부하")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대난방실내부하")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("난방최대가동시간")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대가열성능")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대냉방기기부하")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대냉방실내부하")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("냉방최대가동시간")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대냉각성능")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("최대가습성능")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), 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("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Return 0 Else Return TOSG(DR(0)("공조풍량")) End If End Get Set(ByVal value As Decimal) Dim DR() As DSR.최대냉난방부하Row = CType(DSETR.최대냉난방부하.Select("zone='" & Zone & "'"), DSR.최대냉난방부하Row()) If DR.GetUpperBound(0) = -1 Then MsgBox(ErrMsg) Else DR(0)("공조풍량") = value End If End Set End Property End Class End Class