Collapse All Expand All Language Filter: Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: J# Code: JScript

EDKB12WS Reference
ModMain.Check_Umfeld Method
See Also

Assembly: EDKB12WS (in EDKB12WS.exe)

# Syntax

Visual Basic
Private Shared Function Check_Umfeld() As Boolean
C#
private static bool Check_Umfeld()
C++
private: static bool Check_Umfeld()
JScript
private static function Check_Umfeld() : boolean;

# Source code

Visual Basic | Copy Code
Private Function Check_Umfeld() As Boolean If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld", clsDivFnkt.Enum_InfoTyp.Information) End If Try If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Mitarbeiter", clsDivFnkt.Enum_InfoTyp.Information) End If xMitarbeiter.xtgnummer = tmpAction.GetParameterByName("creatorTg").Value Mitarbeiter.cpMainConnectionProvider = Globals.conn conn.OpenConnection() xMitarbeiter.cpMainConnectionProvider = Globals.conn Mitarbeiterdata = xMitarbeiter.SelectWithTGNummer() conn.CloseConnection(True) Mitarbeiter.cpMainConnectionProvider = Globals.conn conn.OpenConnection() Mitarbeiter.iMitarbeiternr = New SqlInt32(Mitarbeiterdata.Rows(0).Item("Mitarbeiternr")) Mitarbeiter.SelectOne() conn.CloseConnection(True) If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Dokumenttyp", clsDivFnkt.Enum_InfoTyp.Information) End If DokType.cpMainConnectionProvider = Globals.conn conn.OpenConnection() DokType.iDokumenttypnr = New SqlInt32(tmpAction.GetParameterByName("DokumentTypNr").Value - 900000000) DokType.SelectOne() conn.CloseConnection(True) If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Partner", clsDivFnkt.Enum_InfoTyp.Information) End If Partner.cpMainConnectionProvider = Globals.conn conn.OpenConnection() Partner.iNRPAR00 = New SqlInt32(tmpAction.GetParameterByName("PartnerNr").Value) Partner.SelectOne() conn.CloseConnection(True) If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Office-Vorlage", clsDivFnkt.Enum_InfoTyp.Information) End If OfficeVorlage.cpMainConnectionProvider = Globals.conn conn.OpenConnection() OfficeVorlage.iOffice_vorlagenr = New SqlInt32(DokType.iOffice_vorlagenr.Value) OfficeVorlage.SelectOne() conn.CloseConnection(True) If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Auslesen Office-Vorlage", clsDivFnkt.Enum_InfoTyp.Information) End If 'Office 2010 If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Param.CheckOffice2010_Vorlage:" + Param.CheckOffice2010_Vorlage.ToString, clsDivFnkt.Enum_InfoTyp.Information) End If If Param.CheckOffice2010_Vorlage = True Then Dim applnr As Integer = Get_Applikationnr(OfficeVorlage.iOffice_vorlagenr.Value) DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Appl-Nr:" + applnr.ToString, clsDivFnkt.Enum_InfoTyp.Information) Select Case applnr Case 0 FileExtension = ".doc" Case 1 FileExtension = ".doc" Case 2 FileExtension = ".xls" Case 3 FileExtension = ".pdf" Case 4 FileExtension = ".docx" Case 5 FileExtension = ".docm" Case 6 FileExtension = ".dotx" Case 7 FileExtension = ".dotm" Case 8 FileExtension = ".xlsx" Case 9 FileExtension = ".xlsm" Case 10 FileExtension = ".xltx" Case 11 FileExtension = ".xltm" End Select Else Select Case OfficeVorlage.iAnwendungnr.Value Case 0 FileExtension = ".doc" Case 1 FileExtension = ".doc" Case 2 FileExtension = ".xls" Case 3 FileExtension = ".pdf" Case 4 FileExtension = ".docx" Case 5 FileExtension = ".docm" Case 6 FileExtension = ".dotx" Case 7 FileExtension = ".dotm" Case 8 FileExtension = ".xlsx" Case 9 FileExtension = ".xlsm" Case 10 FileExtension = ".xltx" Case 11 FileExtension = ".xltm" End Select End If If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld:: Office_Voralge: " + OfficeVorlage.iOffice_vorlagenr.Value.ToString, clsDivFnkt.Enum_InfoTyp.Information) DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld:: Dokumenttyp: " + FileExtension, clsDivFnkt.Enum_InfoTyp.Information) End If If Office_Vorlage_Get_From_DB(OfficeVorlage.iOffice_vorlagenr.Value, Filename + FileExtension) = "" Then Return False End If DokumentFilename = Filename + FileExtension If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Profil", clsDivFnkt.Enum_InfoTyp.Information) End If Profile = Get_Profil(Mitarbeiter.iMitarbeiternr.Value) If Profile.Rows.Count < 1 Then Profilnr = 0 Unterschriftlinks = 0 Unterschriftrechts = 0 Else Profilnr = Profile.Rows(0).Item("Profilnr") Unterschriftlinks = Profile.Rows(0).Item("Unterschriftlinks") Unterschriftrechts = Profile.Rows(0).Item("Unterschriftrechts") End If Profile.Dispose() If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Start Check_Umfeld::Teams", clsDivFnkt.Enum_InfoTyp.Information) End If Teams = Get_Team(Profilnr) If Teams.Rows.Count = 0 Then teamnr = 0 Else teamnr = Teams.Rows(0).Item("Teamnr") End If Teams.Dispose() If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Ende Check_Umfeld (True)", clsDivFnkt.Enum_InfoTyp.Information) End If Return True Catch ex As Exception DivFnkt.InsertJournale("EDKB12::Fehler:: Check_Umfeld::" & ex.Message, clsDivFnkt.Enum_InfoTyp.Fehler) If Param.DebugMode Then DivFnkt.InsertJournale("EDKB12: Ende Check_Umfeld (False)::" & ex.Message, clsDivFnkt.Enum_InfoTyp.Information) End If Return False End Try End Function

# Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2 The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

# Version Information

## .NET Framework Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0 ## .NET Compact Framework Supported in: 3.5, 2.0, 1.0 ## XNA Framework Supported in: 3.0, 2.0, 1.0

# See Also

## Reference ModMain Class ModMain ModMain Members