frmSprachen
This commit is contained in:
13
UID/Programme/frmSprachen.Designer.vb
generated
13
UID/Programme/frmSprachen.Designer.vb
generated
@@ -37,6 +37,7 @@ Partial Class frmSprachen
|
|||||||
Me.txttranslate = New System.Windows.Forms.TextBox()
|
Me.txttranslate = New System.Windows.Forms.TextBox()
|
||||||
Me.Label7 = New System.Windows.Forms.Label()
|
Me.Label7 = New System.Windows.Forms.Label()
|
||||||
Me.txtProgramm = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
Me.txtProgramm = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
|
Me.btnOK = New System.Windows.Forms.Button()
|
||||||
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.DataGridView, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
@@ -183,11 +184,22 @@ Partial Class frmSprachen
|
|||||||
Me.txtProgramm.TabIndex = 3
|
Me.txtProgramm.TabIndex = 3
|
||||||
Me.txtProgramm.TabStop = False
|
Me.txtProgramm.TabStop = False
|
||||||
'
|
'
|
||||||
|
'btnOK
|
||||||
|
'
|
||||||
|
Me.btnOK.Location = New System.Drawing.Point(954, 53)
|
||||||
|
Me.btnOK.Name = "btnOK"
|
||||||
|
Me.btnOK.Size = New System.Drawing.Size(30, 23)
|
||||||
|
Me.btnOK.TabIndex = 15
|
||||||
|
Me.btnOK.Text = "OK"
|
||||||
|
Me.btnOK.UseVisualStyleBackColor = True
|
||||||
|
Me.btnOK.Visible = False
|
||||||
|
'
|
||||||
'frmSprachen
|
'frmSprachen
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(1001, 545)
|
Me.ClientSize = New System.Drawing.Size(1001, 545)
|
||||||
|
Me.Controls.Add(Me.btnOK)
|
||||||
Me.Controls.Add(Me.txtProgramm)
|
Me.Controls.Add(Me.txtProgramm)
|
||||||
Me.Controls.Add(Me.Label7)
|
Me.Controls.Add(Me.Label7)
|
||||||
Me.Controls.Add(Me.Label6)
|
Me.Controls.Add(Me.Label6)
|
||||||
@@ -226,4 +238,5 @@ Partial Class frmSprachen
|
|||||||
Friend WithEvents txttranslate As TextBox
|
Friend WithEvents txttranslate As TextBox
|
||||||
Friend WithEvents Label7 As Label
|
Friend WithEvents Label7 As Label
|
||||||
Friend WithEvents txtProgramm As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtProgramm As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
|
Friend WithEvents btnOK As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -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
|
Public Class frmSprachen
|
||||||
|
|
||||||
@@ -6,6 +9,7 @@ Public Class frmSprachen
|
|||||||
Public table
|
Public table
|
||||||
Public BIND_DB
|
Public BIND_DB
|
||||||
Public programId As Integer
|
Public programId As Integer
|
||||||
|
Private EditRow As Integer = -1
|
||||||
Sub New(table, BIND_DB, programId)
|
Sub New(table, BIND_DB, programId)
|
||||||
Me.table = table
|
Me.table = table
|
||||||
Me.BIND_DB = BIND_DB
|
Me.BIND_DB = BIND_DB
|
||||||
@@ -26,6 +30,8 @@ Public Class frmSprachen
|
|||||||
|
|
||||||
|
|
||||||
txtProgramm.fillWithSQL("SELECT [prog_codename] from [tblProgramme] WHERE [prog_id] ='" & programId & "'", "ADMIN")
|
txtProgramm.fillWithSQL("SELECT [prog_codename] from [tblProgramme] WHERE [prog_id] ='" & programId & "'", "ADMIN")
|
||||||
|
btnOK.Visible = True
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -93,6 +99,7 @@ Public Class frmSprachen
|
|||||||
End With
|
End With
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message)
|
MsgBox(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
@@ -139,10 +146,38 @@ Public Class frmSprachen
|
|||||||
e.Row.Cells("trs_progName").Value = txtProgramm.Text
|
e.Row.Cells("trs_progName").Value = txtProgramm.Text
|
||||||
e.Row.Cells("trs_sprache").Value = cbxSprachen._value
|
e.Row.Cells("trs_sprache").Value = cbxSprachen._value
|
||||||
e.Row.Cells("trs_active").Value = True
|
e.Row.Cells("trs_active").Value = True
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message)
|
MsgBox(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
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
|
End Class
|
||||||
Reference in New Issue
Block a user