TaskFlow/app/TaskFlow/frmRejectionCommit.vb

61 lines
2.6 KiB
VB.net

Public Class frmRejectionCommit
Public pRejection_Commited As Boolean = False
Private oProfilID As Integer = 0
Public pRejection_Action As String = ""
Public pRejection_Comment As String = ""
Private oDocID As Int64
Private oMsgMissingInput As String
Private SQLReason As String
Public Sub New(pProfilID As Integer, pDocID As Int64, pRejBtn_Caption As String, pSQLReason As String)
MyBase.New()
oProfilID = pProfilID
oDocID = pDocID
SQLReason = pSQLReason
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Me.btnRejection.Text = pRejBtn_Caption
End Sub
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
Me.Close()
End Sub
Private Sub btnRejection_Click(sender As Object, e As EventArgs) Handles btnRejection.Click
If txtComment.Text <> String.Empty Then
If (cmbReason.SelectedIndex <> -1 And SQLReason <> String.Empty) Or SQLReason = String.Empty Then
pRejection_Action = cmbReason.Text
pRejection_Comment = txtComment.Text
pRejection_Commited = True
Me.Close()
Else
MsgBox(oMsgMissingInput, MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
End If
Else
MsgBox(oMsgMissingInput, MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
End If
End Sub
Private Sub frmRejectionCommit_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
lblMsg1.Text = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmRejectionCommit.MSG1")
lblMsg2.Text = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmRejectionCommit.MSG2")
Me.Text = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmRejectionCommit.Caption")
If SQLReason <> String.Empty Then
Dim oDTRejReason As DataTable = DatabaseFallback.GetDatatableECM(SQLReason)
If Not IsNothing(oDTRejReason) Then
cmbReason.Visible = True
lblReasons.Visible = True
Me.cmbReason.DataSource = oDTRejReason
Me.cmbReason.DisplayMember = oDTRejReason.Columns(0).ColumnName
End If
Else
lblReasons.Visible = False
cmbReason.Visible = False
End If
oMsgMissingInput = ClassAllgemeineFunktionen.GUI_LANGUAGE_INFO("frmRejectionCommit.MissingInput")
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
End Try
End Sub
End Class