66 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			VB.net
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			VB.net
		
	
	
	
	
	
| Public Class Frm_v20091231_ResultMon
 | |
| 
 | |
| #Region "data Base 변경여부및 적용방법"
 | |
| 
 | |
|     '''변경된내용을적용한다.
 | |
|     Public Overrides Function AcceptChanged() As Boolean
 | |
| 
 | |
|         Return True
 | |
|     End Function
 | |
| 
 | |
|     '''변경된내용이있다면 취소한다.
 | |
|     Public Overrides Function RejectChanged() As Boolean
 | |
| 
 | |
|         Return True
 | |
|     End Function
 | |
| 
 | |
|     '''데이터에변형이있었는가?
 | |
|     Public Overrides Function HasChanged() As Boolean
 | |
|         Return False
 | |
|     End Function
 | |
| 
 | |
| 
 | |
| 
 | |
| #End Region
 | |
| 
 | |
| 
 | |
| 
 | |
|     Private Sub Frm_v20091231_Result_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 | |
|         Me.bs.DataSource = DSETR
 | |
|         'BindCmbBox()
 | |
|     End Sub
 | |
| 
 | |
|     ''' <summary>
 | |
|     ''' 각 그리드뷰의 1번째(존콤보박스) 데이터소스결정 (디자인타임에서 할당하면 Bs를 모두 생성해야하므로 코드에서 생성)
 | |
|     ''' </summary>
 | |
|     ''' <remarks></remarks>
 | |
|     Private Sub BindCmbBox()
 | |
|         Dim bsz01 As New BindingSource(DSET, "tbl_zone")
 | |
|         Dim Col01 As DataGridViewComboBoxColumn = CType(Me.dv01.Columns(0), DataGridViewComboBoxColumn) : Col01.DataSource = bsz01
 | |
|     End Sub
 | |
| 
 | |
|     Private Sub dv01_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dv01.CellFormatting
 | |
|         Dim Code As String = Me.dv01.Rows(e.RowIndex).Cells("존").Value.ToString
 | |
|         If Code = "00" Then
 | |
|             Me.dv01.Rows(e.RowIndex).Cells("Zone").Value = "합계"
 | |
|             Me.dv01.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.Gainsboro
 | |
|         Else    '//각존의 이름을 가져온다.
 | |
| 
 | |
|             Dim Dr As DS.tbl_zoneRow = CType(DSET.tbl_zone.Select("code='" & Code & "'")(0), Eco2Ar.DS.tbl_zoneRow)
 | |
|             Me.dv01.Rows(e.RowIndex).Cells("Zone").Value = Dr.설명
 | |
|             Me.dv01.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.White
 | |
|         End If
 | |
|     End Sub
 | |
| 
 | |
|     Private Sub dv01_DataError(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewDataErrorEventArgs) Handles dv01.DataError
 | |
| 
 | |
|     End Sub
 | |
| 
 | |
|     Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
 | |
|         Me.bs.Filter = "월='M" & Format(Me.TabControl1.SelectedIndex + 1, "00") & "'"
 | |
|     End Sub
 | |
| 
 | |
|     Private Sub dv01_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dv01.CellContentClick
 | |
| 
 | |
|     End Sub
 | |
| End Class | 
