BugFix
This commit is contained in:
@@ -53,15 +53,30 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Accessibility" />
|
<Reference Include="Accessibility" />
|
||||||
<Reference Include="GrapeCity.ActiveReports.ArsClient.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
<Reference Include="GrapeCity.ActiveReports">
|
||||||
<Reference Include="GrapeCity.ActiveReports.Chart.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.dll</HintPath>
|
||||||
<Reference Include="GrapeCity.ActiveReports.Diagnostics.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
</Reference>
|
||||||
<Reference Include="GrapeCity.ActiveReports.Document.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
<Reference Include="GrapeCity.ActiveReports.Core.Document">
|
||||||
<Reference Include="GrapeCity.ActiveReports.Export.Image.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Core.Document.dll</HintPath>
|
||||||
<Reference Include="GrapeCity.ActiveReports.Export.Pdf.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL" />
|
</Reference>
|
||||||
<Reference Include="GrapeCity.ActiveReports.Extensibility.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
<Reference Include="GrapeCity.ActiveReports.Core.Export.Tiff.Section">
|
||||||
<Reference Include="GrapeCity.ActiveReports.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Core.Export.Tiff.Section.dll</HintPath>
|
||||||
<Reference Include="GrapeCity.ActiveReports.Viewer.Win.v12, Version=12.2.13986.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff, processorArchitecture=MSIL" />
|
</Reference>
|
||||||
|
<Reference Include="GrapeCity.ActiveReports.Document">
|
||||||
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Document.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GrapeCity.ActiveReports.Export.Image">
|
||||||
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Export.Image.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GrapeCity.ActiveReports.Export.Pdf">
|
||||||
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Export.Pdf.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GrapeCity.ActiveReports.Viewer.Common">
|
||||||
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Viewer.Common.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GrapeCity.ActiveReports.Viewer.Win">
|
||||||
|
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\GrapeCity.ActiveReports.Viewer.Win.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -227,6 +242,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="gastro.ico" />
|
<Content Include="gastro.ico" />
|
||||||
|
<EmbeddedResource Include="licenses.licx" />
|
||||||
<None Include="Resources\mail20.png" />
|
<None Include="Resources\mail20.png" />
|
||||||
<None Include="Resources\mail201.png" />
|
<None Include="Resources\mail201.png" />
|
||||||
<None Include="Resources\LogOff20.bmp" />
|
<None Include="Resources\LogOff20.bmp" />
|
||||||
|
|||||||
@@ -245,6 +245,10 @@ Public Class frmMenu
|
|||||||
Dim myData As IDataObject = Clipboard.GetDataObject()
|
Dim myData As IDataObject = Clipboard.GetDataObject()
|
||||||
oMsg.HTMLBody = CType(myData.GetData(GetType(String)), String)
|
oMsg.HTMLBody = CType(myData.GetData(GetType(String)), String)
|
||||||
'''
|
'''
|
||||||
|
'oMsg.Attachments.Add(IO.Path.Combine(IO.Path.GetTempPath(), "termin.ics"),
|
||||||
|
' Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,
|
||||||
|
' Type.Missing,
|
||||||
|
' "Mittagsmenü.ics")
|
||||||
|
|
||||||
oMsg.Display()
|
oMsg.Display()
|
||||||
|
|
||||||
@@ -291,6 +295,10 @@ Public Class frmMenu
|
|||||||
|
|
||||||
' MsgBox(bcc)
|
' MsgBox(bcc)
|
||||||
|
|
||||||
|
'ics erstellen
|
||||||
|
|
||||||
|
'CreateIcsFile(menu.MenuDateBis.AddHours(-11), menu.MenuDateBis.AddHours(-9).AddMinutes(-30), "Mittagsmenü", "Mittagsmenü bestellen!!!")
|
||||||
|
|
||||||
setEmailSend(subject, body, empfaenger, cc, Anhang, Anhangdateiname, bcc)
|
setEmailSend(subject, body, empfaenger, cc, Anhang, Anhangdateiname, bcc)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -326,5 +334,37 @@ Public Class frmMenu
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateIcsFile(startDate As DateTime,
|
||||||
|
endDate As DateTime,
|
||||||
|
summary As String,
|
||||||
|
description As String) As String
|
||||||
|
|
||||||
|
Dim icsPath As String = IO.Path.Combine(IO.Path.GetTempPath(), "termin.ics")
|
||||||
|
|
||||||
|
Dim ics As String =
|
||||||
|
"BEGIN:VCALENDAR" & vbCrLf &
|
||||||
|
"VERSION:2.0" & vbCrLf &
|
||||||
|
"PRODID:-//VERAG//Mittagsmenue//DE" & vbCrLf &
|
||||||
|
"CALSCALE:GREGORIAN" & vbCrLf &
|
||||||
|
"METHOD:PUBLISH" & vbCrLf &
|
||||||
|
"BEGIN:VEVENT" & vbCrLf &
|
||||||
|
"UID:" & Guid.NewGuid().ToString() & "@verag.ag" & vbCrLf &
|
||||||
|
"DTSTAMP:" & DateTime.UtcNow.ToString("yyyyMMddTHHmmssZ") & vbCrLf &
|
||||||
|
"DTSTART:" & startDate.ToUniversalTime().ToString("yyyyMMddTHHmmssZ") & vbCrLf &
|
||||||
|
"DTEND:" & endDate.ToUniversalTime().ToString("yyyyMMddTHHmmssZ") & vbCrLf &
|
||||||
|
"SUMMARY:" & summary & vbCrLf &
|
||||||
|
"DESCRIPTION:" & description & vbCrLf &
|
||||||
|
"BEGIN:VALARM" & vbCrLf &
|
||||||
|
"TRIGGER:-PT30M" & vbCrLf &
|
||||||
|
"ACTION:DISPLAY" & vbCrLf &
|
||||||
|
"DESCRIPTION:Erinnerung" & vbCrLf &
|
||||||
|
"END:VALARM" & vbCrLf &
|
||||||
|
"END:VEVENT" & vbCrLf &
|
||||||
|
"END:VCALENDAR"
|
||||||
|
|
||||||
|
IO.File.WriteAllText(icsPath, ics, System.Text.Encoding.UTF8)
|
||||||
|
|
||||||
|
Return icsPath
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
2
Gastro/licenses.licx
Normal file
2
Gastro/licenses.licx
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
GrapeCity.ActiveReports.SectionReport, GrapeCity.ActiveReports
|
||||||
|
GrapeCity.ActiveReports.Export.Image.Tiff.Section.TiffExport, GrapeCity.ActiveReports.Export.Image
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
Imports GrapeCity.ActiveReports
|
Imports GrapeCity.ActiveReports
|
||||||
|
Imports GrapeCity.ActiveReports.Export.Image
|
||||||
|
Imports GrapeCity.ActiveReports.Export.Image.Page.Renderers
|
||||||
|
Imports GrapeCity.ActiveReports.SectionReportModel
|
||||||
|
Imports GrapeCity.ActiveReports.Export.Image.Tiff.Section
|
||||||
|
Imports System.Drawing.Imaging
|
||||||
|
|
||||||
Public Class usrcntlPrint
|
Public Class usrcntlPrint
|
||||||
|
|
||||||
@@ -60,28 +65,50 @@ Public Class usrcntlPrint
|
|||||||
|
|
||||||
Function exportJPG()
|
Function exportJPG()
|
||||||
Dim filename As String = "C:\Gastro\Menues\" & dt.Rows.Item(0).Item("MenuDateVon").ToString.Substring(0, 10) & ".jpg"
|
Dim filename As String = "C:\Gastro\Menues\" & dt.Rows.Item(0).Item("MenuDateVon").ToString.Substring(0, 10) & ".jpg"
|
||||||
Dim jpge As New Export.Image.Tiff.Section.TiffExport
|
Dim jpge As New Core.Export.Tiff.Section.TiffExport 'Export.Image.Tiff.Section.TiffExport
|
||||||
|
|
||||||
|
|
||||||
jpge.export(Viewer.Document, filename)
|
jpge.export(Viewer.Document, filename)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Sub Export(ByVal ReportDocument As GrapeCity.ActiveReports.Document.SectionDocument, ByVal folderSavePath As String)
|
'Public Sub Export(ByVal ReportDocument As GrapeCity.ActiveReports.Document.SectionDocument, ByVal folderSavePath As String)
|
||||||
' Dim pageindex As Integer = 0
|
' ' Dim pageindex As Integer = 0
|
||||||
|
|
||||||
For Each _pg As GrapeCity.ActiveReports.Document.Section.Page In ReportDocument.Pages
|
' For Each _pg As GrapeCity.ActiveReports.Document.Section.Page In ReportDocument.Pages
|
||||||
_pg.Units = GrapeCity.ActiveReports.Document.Section.Units.Pixels
|
' _pg.Units = GrapeCity.ActiveReports.Document.Section.Units.Pixels
|
||||||
Dim bmp As Bitmap = New Bitmap(CInt(_pg.Width), CInt(_pg.Height))
|
' Dim bmp As Bitmap = New Bitmap(CInt(_pg.Width), CInt(_pg.Height))
|
||||||
Dim g As Graphics = Graphics.FromImage(bmp)
|
' Dim g As Graphics = Graphics.FromImage(bmp)
|
||||||
g.FillRectangle(New SolidBrush(Color.White), 0, 0, bmp.Width, bmp.Height)
|
' g.FillRectangle(New SolidBrush(Color.White), 0, 0, bmp.Width, bmp.Height)
|
||||||
_pg.Draw(g, New RectangleF(0, 0, _pg.Width, _pg.Height))
|
' _pg.Draw(g, New RectangleF(0, 0, _pg.Width, _pg.Height))
|
||||||
bmp.Save(folderSavePath & dt.Rows.Item(0).Item("MenuDateVon").ToString.Substring(0, 10) & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
|
' bmp.Save(folderSavePath & dt.Rows.Item(0).Item("MenuDateVon").ToString.Substring(0, 10) & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
|
||||||
'pageindex += 1
|
' 'pageindex += 1
|
||||||
_pg.Units = GrapeCity.ActiveReports.Document.Section.Units.Inches
|
' _pg.Units = GrapeCity.ActiveReports.Document.Section.Units.Inches
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
|
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub Export(ByVal ReportDocument As GrapeCity.ActiveReports.Document.SectionDocument,
|
||||||
|
ByVal folderSavePath As String)
|
||||||
|
|
||||||
|
Dim baseName As String =
|
||||||
|
dt.Rows.Item(0).Item("MenuDateVon").ToString.Substring(0, 10)
|
||||||
|
|
||||||
|
Dim tiffPath As String = IO.Path.Combine(folderSavePath, baseName & ".tiff")
|
||||||
|
Dim jpgPath As String = IO.Path.Combine(folderSavePath, baseName & ".jpg")
|
||||||
|
|
||||||
|
Dim tiffExport As New TiffExport()
|
||||||
|
tiffExport.DpiX = 96
|
||||||
|
tiffExport.DpiY = 96
|
||||||
|
tiffExport.Export(ReportDocument, tiffPath)
|
||||||
|
|
||||||
|
Using img As Image = Image.FromFile(tiffPath)
|
||||||
|
img.SelectActiveFrame(FrameDimension.Page, 0)
|
||||||
|
img.Save(jpgPath, ImageFormat.Jpeg)
|
||||||
|
End Using
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||||
LoadReci()
|
LoadReci()
|
||||||
If NeuerEintrag = True And SQLTools.CheckIfExist("SELECT * FROM GVerteilerListe WHERE EmpfEMail LIKE '%" & txtEMail.Text & "%' ") Then
|
If NeuerEintrag = True And SQLTools.CheckIfExist("SELECT * FROM GVerteilerListe WHERE EmpfEMail LIKE '" & txtEMail.Text & "%' ") Then
|
||||||
MsgBox("Diese EMail Adresse ist bereits registriert!") : Exit Sub
|
MsgBox("Diese EMail Adresse ist bereits registriert!") : Exit Sub
|
||||||
ElseIf NeuerEintrag = True And SQLTools.CheckIfExist("SELECT * FROM GVerteilerListe WHERE EmpfEMail LIKE '%" & txtEMail.Text & "%' ") = False Then
|
ElseIf NeuerEintrag = True And SQLTools.CheckIfExist("SELECT * FROM GVerteilerListe WHERE EmpfEMail LIKE '" & txtEMail.Text & "%' ") = False Then
|
||||||
'Reci.EmpfID = Now
|
'Reci.EmpfID = Now
|
||||||
Reci.saveAsNew()
|
Reci.saveAsNew()
|
||||||
NeuerEintrag = False
|
NeuerEintrag = False
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
txtName.Enabled = True : txtEMail.Enabled = True
|
txtName.Enabled = True : txtEMail.Enabled = True
|
||||||
NeuerEintrag = True
|
NeuerEintrag = True
|
||||||
Reci = New cEmpfaenger
|
Reci = New cEmpfaenger
|
||||||
txtName.Text = "" : txtEMail.Text = ""
|
txtName.Text = "" : txtEMail.Text = "" : txtSuche.Text = ""
|
||||||
txtName.BackColor = Color.Beige : txtEMail.BackColor = Color.Beige
|
txtName.BackColor = Color.Beige : txtEMail.BackColor = Color.Beige
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user