PDF Report übernommen, aber noch nicht angeschlossen

This commit is contained in:
Daniel Schick 2021-12-17 08:00:26 +01:00
parent 019fe81a8d
commit 5b588712de
13 changed files with 2265 additions and 11 deletions

View File

@ -27,11 +27,12 @@
</setting> </setting>
<setting name="LockingServerAddress" serializeAs="String"> <setting name="LockingServerAddress" serializeAs="String">
<value>http://192.168.2.24/LockingService/LockingService.svc</value> <value>http://192.168.2.24/LockingService/LockingService.svc</value>
<!--value>http://heupferd/bsmd.LockingService/LockingService.svc</value-->
</setting> </setting>
<setting name="ConnectionString" serializeAs="String"> <setting name="ConnectionString" serializeAs="String">
<value>Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</value> <value>Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</value>
<!--value>Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=E:\DATA\DB\NSW.MDF;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False</value--> </setting>
<setting name="ReportAuthor" serializeAs="String">
<value>BSMD ReportGenerator</value>
</setting> </setting>
</ENI2.Properties.Settings> </ENI2.Properties.Settings>
</applicationSettings> </applicationSettings>

View File

@ -37,7 +37,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>6.7.3.0</ApplicationVersion> <ApplicationVersion>6.8.0.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>
@ -145,6 +145,21 @@
<HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath> <HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="MigraDoc.DocumentObjectModel-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.DocumentObjectModel-gdi.dll</HintPath>
</Reference>
<Reference Include="MigraDoc.Rendering-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.Rendering-gdi.dll</HintPath>
</Reference>
<Reference Include="MigraDoc.RtfRendering-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\MigraDoc.RtfRendering-gdi.dll</HintPath>
</Reference>
<Reference Include="PdfSharp-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\PdfSharp-gdi.dll</HintPath>
</Reference>
<Reference Include="PdfSharp.Charting-gdi, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
<HintPath>packages\PDFsharp-MigraDoc-gdi.1.50.5147\lib\net20\PdfSharp.Charting-gdi.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
@ -381,6 +396,9 @@
<DependentUpon>VisitIdDialog.xaml</DependentUpon> <DependentUpon>VisitIdDialog.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="LocalizedLookup.cs" /> <Compile Include="LocalizedLookup.cs" />
<Compile Include="Report\LabelStorage.cs" />
<Compile Include="Report\ReportDocument.cs" />
<Compile Include="Report\ReportManager.cs" />
<Compile Include="Service References\LockingServiceReference\Reference.cs"> <Compile Include="Service References\LockingServiceReference\Reference.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@ -761,6 +779,7 @@
<Resource Include="Resources\clock_history.ico" /> <Resource Include="Resources\clock_history.ico" />
<Resource Include="Resources\document_down.png" /> <Resource Include="Resources\document_down.png" />
<Resource Include="Resources\undo.png" /> <Resource Include="Resources\undo.png" />
<Resource Include="Resources\Logo.gif" />
<Content Include="x64\SQLite.Interop.dll"> <Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
@ -893,6 +912,7 @@
<ItemGroup> <ItemGroup>
<WCFMetadataStorage Include="Service References\LockingServiceReference\" /> <WCFMetadataStorage Include="Service References\LockingServiceReference\" />
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" /> <Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net451\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@ -570,6 +570,16 @@ namespace ENI2.Properties {
} }
} }
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap Logo {
get {
object obj = ResourceManager.GetObject("Logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary> /// </summary>

View File

@ -1750,4 +1750,7 @@
<data name="textSelectNone" xml:space="preserve"> <data name="textSelectNone" xml:space="preserve">
<value>Select none</value> <value>Select none</value>
</data> </data>
<data name="Logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Logo.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

View File

@ -73,12 +73,21 @@ namespace ENI2.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nsw;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;P" + [global::System.Configuration.DefaultSettingValueAttribute("Initial Catalog=nswtest;Data Source=192.168.2.24\\SQLEXPRESS;Uid=dfuser;pwd=dfpass" +
"ersist Security Info=False;Connection Reset=false")] "wd;Persist Security Info=False;Connection Reset=false")]
public string ConnectionString { public string ConnectionString {
get { get {
return ((string)(this["ConnectionString"])); return ((string)(this["ConnectionString"]));
} }
} }
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("BSMD ReportGenerator")]
public string ReportAuthor {
get {
return ((string)(this["ReportAuthor"]));
}
}
} }
} }

View File

@ -18,7 +18,10 @@
<Value Profile="(Default)">http://192.168.2.24/LockingService/LockingService.svc</Value> <Value Profile="(Default)">http://192.168.2.24/LockingService/LockingService.svc</Value>
</Setting> </Setting>
<Setting Name="ConnectionString" Type="System.String" Scope="Application"> <Setting Name="ConnectionString" Type="System.String" Scope="Application">
<Value Profile="(Default)">Initial Catalog=nsw;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</Value> <Value Profile="(Default)">Initial Catalog=nswtest;Data Source=192.168.2.24\SQLEXPRESS;Uid=dfuser;pwd=dfpasswd;Persist Security Info=False;Connection Reset=false</Value>
</Setting>
<Setting Name="ReportAuthor" Type="System.String" Scope="Application">
<Value Profile="(Default)">BSMD ReportGenerator</Value>
</Setting> </Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@ -0,0 +1,80 @@
// Copyright (c) 2015-2017 schick Informatik
// Zugriff auf SQLite Datenbank mit Report Überschriften
using System.Collections.Generic;
using System.Data;
using System.Data.SQLite;
namespace ENI2.Report
{
/// <summary>
/// Zugriff auf SQLite Datenbank mit Report Überschriften
/// </summary>
public class LabelStorage
{
private static readonly SQLiteConnection _con;
private const string _locode_DB_NAME = "report.db";
private static Dictionary<string, string> _collectionLabelDict = null;
private static Dictionary<string, string> _fieldLabelDict = null;
static LabelStorage()
{
_con = new SQLiteConnection(string.Format("data source={0}; Version=3;", _locode_DB_NAME));
_con.Open();
}
#region public static properties
public static Dictionary<string, string> CollectionLabelDict
{
get
{
if(_collectionLabelDict == null)
{
_collectionLabelDict = new Dictionary<string, string>();
string query = "SELECT Name, Value FROM CollectionLabel";
SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
if (!reader.IsDBNull(0) && !reader.IsDBNull(1))
_collectionLabelDict[reader.GetString(0)] = reader.GetString(1);
}
reader.Close();
}
return _collectionLabelDict;
}
}
public static Dictionary<string, string> FieldLabelDict
{
get
{
if (_fieldLabelDict == null)
{
_fieldLabelDict = new Dictionary<string, string>();
string query = "SELECT Name, Value FROM FieldLabel";
SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
if (!reader.IsDBNull(0) && !reader.IsDBNull(1))
_fieldLabelDict[reader.GetString(0)] = reader.GetString(1);
}
reader.Close();
}
return _fieldLabelDict;
}
}
public static void CloseDB()
{
_con.Close();
}
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,35 @@
// Copyright (c) 2017-present schick Informatik
// Description: Former ReportService, manager class handles creation of a PDF document
// from a set of report classes
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using bsmd.database;
namespace ENI2.Report
{
class ReportManager
{
public bool Import(string filePath, MessageCore core, List<Message.NotificationClass> classes, out string readMessage)
{
bool result = false;
readMessage = "";
try
{
}
catch (Exception ex)
{
readMessage += ex.Message;
}
return result;
}
}
}

BIN
ENI2/Resources/Logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -7,6 +7,7 @@ Sample license text.
<package id="Extended.Wpf.Toolkit" version="4.1.0" targetFramework="net452" /> <package id="Extended.Wpf.Toolkit" version="4.1.0" targetFramework="net452" />
<package id="log4net" version="2.0.13" targetFramework="net452" /> <package id="log4net" version="2.0.13" targetFramework="net452" />
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1000" targetFramework="net452" /> <package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1000" targetFramework="net452" />
<package id="PDFsharp-MigraDoc-gdi" version="1.50.5147" targetFramework="net452" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.115.0" targetFramework="net452" /> <package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.115.0" targetFramework="net452" />
<package id="System.Data.SQLite.Core" version="1.0.115.0" targetFramework="net452" /> <package id="System.Data.SQLite.Core" version="1.0.115.0" targetFramework="net452" />
</packages> </packages>

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")] [assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")] [assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("6.7.0")] [assembly: AssemblyInformationalVersion("6.8.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2021 schick Informatik")] [assembly: AssemblyCopyright("Copyright © 2014-2021 schick Informatik")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("6.7.0.*")] [assembly: AssemblyVersion("6.8.0.*")]