frmSprachen
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports System.Windows.Controls
|
||||
Imports GrapeCity.ActiveReports.ReportsCore.Tools
|
||||
Imports Microsoft.Office.Interop.Word
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmSprachen
|
||||
|
||||
@@ -6,6 +9,7 @@ Public Class frmSprachen
|
||||
Public table
|
||||
Public BIND_DB
|
||||
Public programId As Integer
|
||||
Private EditRow As Integer = -1
|
||||
Sub New(table, BIND_DB, programId)
|
||||
Me.table = table
|
||||
Me.BIND_DB = BIND_DB
|
||||
@@ -26,6 +30,8 @@ Public Class frmSprachen
|
||||
|
||||
|
||||
txtProgramm.fillWithSQL("SELECT [prog_codename] from [tblProgramme] WHERE [prog_id] ='" & programId & "'", "ADMIN")
|
||||
btnOK.Visible = True
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -93,6 +99,7 @@ Public Class frmSprachen
|
||||
End With
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
@@ -139,10 +146,38 @@ Public Class frmSprachen
|
||||
e.Row.Cells("trs_progName").Value = txtProgramm.Text
|
||||
e.Row.Cells("trs_sprache").Value = cbxSprachen._value
|
||||
e.Row.Cells("trs_active").Value = True
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||
|
||||
If DataGridView.Columns.Count = 0 Or DataGridView.SelectedRows.Count = 0 Then 'alles gelöscht oder markierte Zeile gelöscht
|
||||
SPRACHENBind.updateBinding()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DataGridView.CurrentRow.Cells("trs_object").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("trs_control").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("trs_text").ToString <> "" AndAlso DataGridView.CurrentRow.Cells("trs_textDE").ToString <> "" AndAlso EditRow >= 0 Then
|
||||
SPRACHENBind.updateBinding()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub DataGridView_EditingControlShowing(sender As Object, e As DataGridViewEditingControlShowingEventArgs) Handles DataGridView.EditingControlShowing
|
||||
EditRow = DataGridView.CurrentRow.Index
|
||||
End Sub
|
||||
|
||||
Private Sub DataGridView_SelectionChanged(sender As Object, e As EventArgs) Handles DataGridView.SelectionChanged
|
||||
If EditRow >= 0 Then
|
||||
Dim new_row As Integer = EditRow
|
||||
EditRow = -1
|
||||
DataGridView.CurrentCell = DataGridView.Rows(new_row).Cells(
|
||||
DataGridView.CurrentCell.ColumnIndex)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user