Messenger

This commit is contained in:
2023-09-19 18:03:18 +02:00
parent df6223aaa2
commit c4a68cd19b
4 changed files with 37 additions and 8 deletions

View File

@@ -85,6 +85,9 @@ Public Class cMitarbeiter
Property mit_timasId As Object = Nothing
Property mit_ATGRNAccessCode_AT51FP7 As Object = Nothing
Property mit_ATGRNAccessCode_AT52VA6 As Object = Nothing
Property mit_Sprachkentnisse As Object = Nothing
@@ -188,6 +191,7 @@ Public Class cMitarbeiter
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_timasId", mit_timasId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_ATGRNAccessCode_AT51FP7", mit_ATGRNAccessCode_AT51FP7))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_ATGRNAccessCode_AT52VA6", mit_ATGRNAccessCode_AT52VA6))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Sprachkentnisse", mit_Sprachkentnisse))
Return list
@@ -381,6 +385,7 @@ Public Class cMitarbeiter
If Not dr.Item("mit_timasId") Is DBNull.Value Then Me.mit_timasId = dr.Item("mit_timasId")
If Not dr.Item("mit_ATGRNAccessCode_AT51FP7") Is DBNull.Value Then Me.mit_ATGRNAccessCode_AT51FP7 = dr.Item("mit_ATGRNAccessCode_AT51FP7")
If Not dr.Item("mit_ATGRNAccessCode_AT52VA6") Is DBNull.Value Then Me.mit_ATGRNAccessCode_AT52VA6 = dr.Item("mit_ATGRNAccessCode_AT52VA6")
If Not dr.Item("mit_Sprachkentnisse") Is DBNull.Value Then Me.mit_Sprachkentnisse = dr.Item("mit_Sprachkentnisse")
Catch ex As Exception

View File

@@ -473,7 +473,7 @@ Public Class frmMessenger
SplitContainer3.Panel1Collapsed = False
initDGVMembers()
Else
lblChatName.Text = SQL.getValueTxtBySql("SELECT isnull(mit_vname,'') + ' ' + isnull(mit_nname,'') FROM [tblMessenger_ChatMembers] inner join tblMitarbeiter on mit_id=chatMb_maId where chatMb_chatId ='" & CHAT.chat_id & "' and chatMb_maId<>'" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "'", "ADMIN")
lblChatName.Text = SQL.getValueTxtBySql("SELECT isnull(mit_vname,'') + ' ' + isnull(mit_nname,'') + ' '+ isnull('('+ mit_Sprachkentnisse +')','')FROM [tblMessenger_ChatMembers] inner join tblMitarbeiter on mit_id=chatMb_maId where chatMb_chatId ='" & CHAT.chat_id & "' and chatMb_maId<>'" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "'", "ADMIN")
btnTeilnehmer.BackgroundImage = My.Resources.person
SplitContainer3.Panel1Collapsed = True

View File

@@ -30,7 +30,7 @@ Public Class frmMessenger_NeuerChat
If Not loaded Then Exit Sub
With dgvMitarbeiter
Dim FirmaTMP = MyComboBox1._value
Dim sqlStr = "SELECT TOP (1000) [mit_id],[mit_nname] + ' ' + [mit_vname] + ' (' + mit_niederlassung + ')' as MAname,CASE WHEN mit_firma='ALL' THEN mit_firmaHaupt ELSE mit_firma END as mit_firma FROM [tblMitarbeiter]"
Dim sqlStr = "SELECT TOP (1000) [mit_id],[mit_nname] + ' ' + [mit_vname] + ' (' + mit_niederlassung + ')' as MAname, isnull(mit_Sprachkentnisse,'') as Sprache ,CASE WHEN mit_firma='ALL' THEN mit_firmaHaupt ELSE mit_firma END as mit_firma FROM [tblMitarbeiter]"
sqlStr &= " WHERE mit_gekuendigt=0 AND /*mit_abteilung IN ('QS','ZOLL','DISPO') AND*/ [mit_TESTonly]=0 AND [mit_pseudoUser]=0 AND [mit_ChatBenutzer]=1 "
If MyComboBox1._value <> "" Then sqlStr &= " AND mit_firma IN ('" & FirmaTMP & "','BEIDE','ALLE','ALL')"
If MyTextBox1.Text <> "" Then sqlStr &= " AND (mit_nname LIKE '" & MyTextBox1.Text & "%' OR mit_vname LIKE '" & MyTextBox1.Text & "%' )"

View File

@@ -1,5 +1,6 @@
Imports System.Diagnostics.Tracing
Imports System.Net
Imports System.Runtime.Remoting
Imports System.Threading
Imports System.Windows.Forms
@@ -421,11 +422,20 @@ Public Class cTimasAPI
emp.phone1 = json.StringOf("phone1")
emp.phone2 = json.StringOf("phone2")
emp.birthdayDate = json.StringOf("birthday")
emp.entryDate = json.StringOf("entry")
emp.exitDate = json.StringOf("exit")
Debug.WriteLine(json.StringOf("birthday"))
If (json.StringOf("birthday") <> "null") Then
emp.birthdayDate = CDate(json.StringOf("birthday")).ToString("yyyy-MM-dd")
End If
If (json.StringOf("entry") <> "null") Then
emp.entryDate = CDate(json.StringOf("entry")).ToString("yyyy-MM-dd")
End If
If (json.StringOf("exit") <> "null") Then
emp.exitDate = CDate(json.StringOf("exit")).ToString("yyyy-MM-dd")
End If
Dim groups As Chilkat.JsonArray = json.ArrayOf("groups")
If (json.LastMethodSuccess = False) Then
@@ -490,9 +500,23 @@ Public Class cTimasAPI
success = json.UpdateString("phone1", emp.phone1)
success = json.UpdateString("phone2", emp.phone2)
success = json.UpdateString("birthday", emp.birthdayDate)
success = json.UpdateString("entry", emp.entryDate)
success = json.UpdateString("exit", emp.exitDate)
If IsDate(emp.birthdayDate) Then
success = json.UpdateString("birthday", CDate(emp.birthdayDate).ToString("yyyy-MM-dd"))
Else
success = json.UpdateString("birthday", "")
End If
If IsDate(emp.entryDate) Then
success = json.UpdateString("entry", CDate(emp.entryDate).ToString("yyyy-MM-dd"))
Else
success = json.UpdateString("entry", "")
End If
If IsDate(emp.exitDate) Then
success = json.UpdateString("exit", CDate(emp.exitDate).ToString("yyyy-MM-dd"))
Else
success = json.UpdateString("exit", "")
End If
Dim sbRequestBody As New Chilkat.StringBuilder