jj 09.11 docgrid

This commit is contained in:
JenneJ
2016-11-09 11:07:26 +01:00
parent b6d9a7952e
commit b96fa6fe69
3 changed files with 150 additions and 145 deletions

View File

@@ -3699,7 +3699,9 @@ Public Class frmConstructor_Main
DT_DOCRESULT_DROPDOWN_ITEMS,
AddressOf OnCBSelectedValueChanged,
AddressOf OnDateSelectedValueChanged,
AddressOf OnTextSelectedValueChanged, Type)
AddressOf OnTextSelectedValueChanged,
AddressOf OnCheckboxValueChanged,
Type)
If TCDetails.SelectedTabPageIndex <> 1 Then
TCDetails.SelectedTabPageIndex = 1
@@ -3781,8 +3783,19 @@ Public Class frmConstructor_Main
Try
Dim DatePicker As DateEdit = sender
Dim value As DateTime = DatePicker.EditValue
Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
If Date.Parse(DatePicker.OldEditValue) = DatePicker.EditValue Then
Exit Sub
End If
'Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
'Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
' Config id über mainView -> detailView herausfinden
Dim mainView As GridView = GridControlDocSearch.MainView
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
Dim configid = detailRow.Item("CONFIG_ID")
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
@@ -3802,8 +3815,19 @@ Public Class frmConstructor_Main
If value.ToUpper = "Not displayable in Group-Search".ToUpper Then
Exit Sub
End If
Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
If TextBox.OldEditValue = TextBox.EditValue Then
Exit Sub
End If
'Dim colTitle = DirectCast(GridControlDocSearch.MainView, DevExpress.XtraGrid.Views.Grid.GridView).FocusedColumn.FieldName
'Dim configId As Integer = ClassWindreamDocGrid.RESULT_CONFIG_IDS.Item(colTitle)
' Config id über mainView -> detailView herausfinden
Dim mainView As GridView = GridControlDocSearch.MainView
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
Dim configid = detailRow.Item("CONFIG_ID")
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
@@ -3814,6 +3838,28 @@ Public Class frmConstructor_Main
End Try
End Sub
Private Sub OnCheckboxValueChanged(sender As Object, e As EventArgs)
'TODO Save Checkboxvalue
Try
Dim CheckBox As CheckEdit = sender
Dim value As Boolean = CheckBox.EditValue
' Config id über mainView -> detailView herausfinden
Dim mainView As GridView = GridControlDocSearch.MainView
Dim detailView As GridView = mainView.GetDetailView(mainView.FocusedRowHandle, mainView.GetRelationIndex(mainView.FocusedRowHandle, "docIdDetails"))
Dim detailRow As DataRowView = detailView.GetRow(detailView.FocusedRowHandle)
Dim configid = detailRow.Item("CONFIG_ID")
Dim docId As Integer = ClassWindreamDocGrid.SELECTED_DOC_ID
Dim user As String = Environment.UserName
Dim Sql As String = String.Format("EXEC PRPMO_DOC_VALUE {0}, {1}, '{2}', '{3}'", docId, configid, value, user)
ClassDatabase.Execute_non_Query(Sql)
Catch ex As Exception
MsgBox("Error in OnCheckboxValueChanged:" & vbNewLine & ex.Message)
End Try
End Sub
Public Class WDDoc_Combobox_Item
Implements IConvertible