61 lines
2.7 KiB
VB.net
61 lines
2.7 KiB
VB.net
Imports System.Windows.Forms
|
|
|
|
Public Class Frm_RepResult_Admin
|
|
Public Overrides Function AcceptChanged() As Boolean
|
|
|
|
End Function
|
|
Public Overrides Function RejectChanged() As Boolean
|
|
|
|
End Function
|
|
Public Overrides Function HasChanged() As Boolean
|
|
|
|
End Function
|
|
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
|
|
Select Case Me.DataGridView1.Rows(e.RowIndex).Cells(2).Value.ToString
|
|
Case "MT"
|
|
Me.DataGridView1.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Green
|
|
Case "TT"
|
|
Me.DataGridView1.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Blue
|
|
Case "ST"
|
|
Me.DataGridView1.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Tomato
|
|
Case "SL"
|
|
Me.DataGridView1.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.DarkMagenta
|
|
Case Else
|
|
Me.DataGridView1.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Black
|
|
End Select
|
|
|
|
End Sub
|
|
|
|
Private Sub Frm_RepResult_Admin_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
|
Me.bsmain.DataSource = DSETR1
|
|
Me.bs_1차소요량.DataSource = DSETR1
|
|
Me.bs_max.DataSource = DSETR1
|
|
Me.bs_면적.DataSource = DSETR1
|
|
Me.bs_생산E.DataSource = DSETR1
|
|
Me.bs_소요량.DataSource = DSETR1
|
|
|
|
Dim dv() As DataGridView = New DataGridView() {Me.DataGridView7, _
|
|
Me.DataGridView9, _
|
|
Me.DataGridView10, _
|
|
Me.DataGridView11, _
|
|
Me.DataGridView12, _
|
|
Me.DataGridView13, _
|
|
Me.DataGridView14, _
|
|
Me.DataGridView15, _
|
|
Me.DataGridView16, _
|
|
Me.DataGridView17, _
|
|
Me.DataGridView18, _
|
|
Me.DataGridView19}
|
|
For i As Integer = 1 To 12
|
|
Dim Bs As New BindingSource
|
|
Bs.DataSource = DSETR1
|
|
Bs.DataMember = "월별에너지분석"
|
|
Bs.Filter = "월='M" & Format(i, "00") & "'"
|
|
dv(i - 1).DataSource = Bs
|
|
Next
|
|
' Me.bs.DataSource = DSETR
|
|
End Sub
|
|
|
|
End Class
|
|
|