3.5.7.8: kleine Zwischenversion

This commit is contained in:
Daniel Schick 2017-05-16 06:42:54 +00:00
parent a6fd136e3d
commit c70d90e9da
45 changed files with 1607 additions and 121 deletions

View File

@ -17,7 +17,7 @@ Sample license text.
<applicationSettings>
<ENI2.Properties.Settings>
<setting name="ConnectionString" serializeAs="String">
<value>Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value>
<value>Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value>
</setting>
</ENI2.Properties.Settings>
</applicationSettings>
@ -28,4 +28,16 @@ Sample license text.
</setting>
</ENI2.Properties.Settings>
</userSettings>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/bsmd.LockingService/LockingService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService"
contract="LockingServiceReference.IService" name="BasicHttpBinding_IService" />
</client>
</system.serviceModel>
</configuration>

View File

@ -9,6 +9,7 @@ using bsmd.database;
using System.Windows.Controls;
using System.Windows.Input;
using System;
using ENI2.LockingServiceReference;
namespace ENI2
{
@ -17,6 +18,7 @@ namespace ENI2
/// </summary>
public partial class App : Application
{
private ServiceClient lockingServiceClient;
public App() : base()
{
@ -39,6 +41,15 @@ namespace ENI2
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
try
{
// this.lockingServiceClient = new ServiceClient();
}
catch(Exception ex)
{
System.Diagnostics.Trace.WriteLine("Exception creating locking service client: {0}", ex.ToString());
}
}
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)

View File

@ -12,13 +12,14 @@ namespace ENI2.Controls
/// <summary>
/// Basisklasse aller Bearbeitungsdialoge. OK/Cancel Buttons und Window Placement
/// </summary>
[TemplatePart(Name = "buttonOK",Type = typeof(Button))]
[TemplatePart(Name = "buttonOK", Type = typeof(Button))]
[TemplatePart(Name = "buttonCancel", Type = typeof(Button))]
public class EditWindowBase : Window
{
public event Action OKClicked;
public event Action CancelClicked;
protected bool shouldCancel;
static EditWindowBase()
{
@ -36,9 +37,9 @@ namespace ENI2.Controls
};
}
private void Window_Closing(object sender, CancelEventArgs e)
private void Window_Closing(object sender, CancelEventArgs e)
{
// ENI2.Properties.Settings.Default.M
if (this.shouldCancel) e.Cancel = true;
}
protected override void OnSourceInitialized(EventArgs e)
@ -50,6 +51,7 @@ namespace ENI2.Controls
protected virtual void OnOkClicked()
{
this.DialogResult = true;
this.shouldCancel = false;
OKClicked?.Invoke();
}

View File

@ -36,9 +36,9 @@ namespace ENI2
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textSecurity, MessageGroupControlType = typeof(SecurityDetailControl), ImagePath = "Resources/shield_yellow.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPSC72h, MessageGroupControlType = typeof(PSC72hDetailControl), ImagePath = "Resources/alarmclock.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textMDH, MessageGroupControlType = typeof(MaritimeHealthDeclarationDetailControl), ImagePath = "Resources/medical_bag.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textShipData, MessageGroupControlType = typeof(ShipDataDetailControl), ImagePath = "Resources/containership.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textBorderPolice, MessageGroupControlType = typeof(BorderPoliceDetailControl), ImagePath = "Resources/policeman_german.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDepartureNotification, MessageGroupControlType = typeof(DepartureNotificationDetailControl), ImagePath = "Resources/arrow_up_right_green.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textShipData, MessageGroupControlType = typeof(ShipDataDetailControl), ImagePath = "Resources/containership.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textBorderPolice, MessageGroupControlType = typeof(BorderPoliceDetailControl), ImagePath = "Resources/policeman_german.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGArrival, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGDeparture, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textTowage, MessageGroupControlType = typeof(TowageDetailControl), ImagePath = "Resources/ship2.png" });

View File

@ -18,16 +18,19 @@
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" Margin="0,0,10,0"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="0" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}"/>
<enictrl:LocodeControl Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}"/>
<!--Grid Grid.Column="1" Grid.Row="0" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@ -36,23 +39,32 @@
<xctk:WatermarkComboBox Grid.Column="0" x:Name="comboBoxPoC" Margin="2" IsEditable="True" Watermark="Type for Locode.." TextBoxBase.TextChanged="ComboBox_TextChanged" ItemsSource="{Binding LocodePoCList, Mode=TwoWay}" SelectedItem="{Binding PoC, Mode=TwoWay}" />
<Image Name="imagePoCState" Grid.Column="1" Source="../Resources/bullet_ball_grey.png" />
</-->
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0"/>
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="3" IsReadOnly="True" Margin="2"/>
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="3" Content="{x:Static p:Resources.textVisitTransitId}" Margin="0,0,10,0" />
<TextBox Name="textBoxDisplayId" Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" IsReadOnly="True" Margin="2" />
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" Margin="0,0,10,0" />
<TextBox Name="textBoxIMO" Grid.Row="1" Grid.Column="1" Text="{Binding IMO}" Margin="2" />
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
<TextBox Name="textBoxENI" Grid.Row="1" Grid.Column="3" Text="{Binding ENI}" Margin="2" />
<TextBox Name="textBoxIMO" Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="1" Text="{Binding IMO}" Margin="2" IsReadOnly="True" />
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="3" Content="{x:Static p:Resources.textENI}" Margin="0,0,10,0" />
<TextBox Name="textBoxENI" Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="2" Text="{Binding ENI}" Margin="2" IsReadOnly="True" />
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Margin="0,0,10,0" />
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="3" Content="{x:Static p:Resources.textETDPortOfCall}" Margin="0,0,10,0" />
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textATAPortOfCall}" Margin="0,0,10,0" />
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
<xctk:DateTimePicker Grid.Column="1" Grid.Row="2" Value="{Binding ETA, Mode=TwoWay}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
<xctk:DateTimePicker Grid.Column="3" Grid.Row="2" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
<xctk:DateTimePicker Grid.Column="1" Grid.Row="3" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
<xctk:DateTimePicker Grid.Column="3" Grid.Row="3" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" Margin="0,0,10,0" />
<Label Name="labelCreated" Grid.Column="1" Grid.Row="4" Margin="2, 0, 0, 0" />
<DataGrid Grid.Row="5" Grid.ColumnSpan="4" Margin="0,8,0,0" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="3" Content="{x:Static p:Resources.textATDPortOfCall}" Margin="0,0,10,0" />
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" Value="{Binding ETAToPortOfCall, Mode=TwoWay}" Name="dateTimePickerETA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}"/>
<xctk:DateTimePicker Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="2" Value="{Binding ETDFromPortOfCall, Mode=TwoWay}" Name="dateTimePickerETD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
<xctk:DateTimePicker Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="3" Value="{Binding ATAPortOfCall, Mode=TwoWay}" Name="dateTimePickerATA" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
<xctk:DateTimePicker Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="3" Value="{Binding ATDPortOfCall, Mode=TwoWay}" Name="dateTimePickerATD" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="False" ContextMenu="{DynamicResource ClearContextMenu}" />
<Label HorizontalAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textTicketNo}" Margin="0,0,10,0" />
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="3" Content="{x:Static p:Resources.textCreated}" Margin="0,0,10,0" />
<Label Name="labelCreated" Grid.Column="4" Grid.Row="4" Margin="2, 0, 0, 0" />
<TextBox Name="textBoxTicketNo" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2" Text="{Binding TicketNo}" Margin="2" />
<!-- Command buttons -->
<Button IsEnabled="False" Name="buttonStorno" Grid.Column="1" Grid.Row="5" Margin="2" Click="buttonStorno_Click" Content="{x:Static p:Resources.textCancelDeclaration}"/>
<Button IsEnabled="False" Name="buttonCopy" Grid.Column="2" Grid.Row="5" Margin="2" Click="buttonCopy_Click" Content="{x:Static p:Resources.textCopyData}"/>
<Button IsEnabled="False" Name="buttonSendPDF" Grid.Column="3" Grid.Row="5" Margin="2" Click="buttonSendPDF_Click" Content="{x:Static p:Resources.textCreatePDF}"/>
<Button IsEnabled="False" Name="buttonQueryHIS" Grid.Column="5" Grid.Row="5" Margin="2" Click="buttonQueryHIS_Click" Content="{x:Static p:Resources.textQueryHIS}"/>
<!-- Data Grid -->
<DataGrid Grid.Row="6" Grid.ColumnSpan="6" Margin="0,8,0,0" x:Name="dataGridMessages" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" CanUserAddRows="False"
SelectionMode="Single" AutoGenerateColumns="False" MouseDoubleClick="dataGrid_MouseDoubleClick" PreviewKeyDown="dataGrid_PreviewKeyDown">
<DataGrid.Columns>
<DataGridTemplateColumn Header=" " Width="SizeToCells" IsReadOnly="True">

View File

@ -17,7 +17,10 @@ namespace ENI2.DetailViewControls
/// </summary>
public partial class OverViewDetailControl : DetailBaseControl
{
private Message _message = null;
private Message _message = null;
private Message _ataMessage;
private Message _atdMessage;
private Message _noanodMessage;
public OverViewDetailControl()
{
@ -35,9 +38,9 @@ namespace ENI2.DetailViewControls
this.textBoxENI.DataContext = this.Core;
this.textBoxIMO.DataContext = this.Core;
this.locodePoC.DataContext = this.Core;
this.dateTimePickerETA.DataContext = this.Core;
//this.dateTimePickerETD.DataContext = ..
this.locodePoC.DataContext = this.Core;
this.textBoxTicketNo.DataContext = this.Core;
this.labelCreated.Content = this.Core.Created?.ToString();
Binding vtBinding = new Binding();
@ -51,6 +54,13 @@ namespace ENI2.DetailViewControls
{
if (aMessage.MessageNotificationClass == notificationClass)
_message = aMessage;
if (aMessage.MessageNotificationClass == Message.NotificationClass.ATA)
this._ataMessage = aMessage;
if (aMessage.MessageNotificationClass == Message.NotificationClass.ATD)
this._atdMessage = aMessage;
if (aMessage.MessageNotificationClass == Message.NotificationClass.NOA_NOD)
this._noanodMessage = aMessage;
switch(aMessage.MessageNotificationClass)
{
case Message.NotificationClass.VISIT:
@ -101,26 +111,27 @@ namespace ENI2.DetailViewControls
aMessage.ENINotificationDetailGroup = Properties.Resources.textMDH;
aMessage.ENINotificationDetailIndex = 7;
break;
case Message.NotificationClass.STAT:
aMessage.ENINotificationIconString = "../Resources/containership.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textShipData;
aMessage.ENINotificationDetailIndex = 8;
break;
case Message.NotificationClass.BPOL:
case Message.NotificationClass.CREW:
case Message.NotificationClass.PAS:
aMessage.ENINotificationIconString = "../Resources/policeman_german.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice;
aMessage.ENINotificationDetailIndex = 9;
break;
case Message.NotificationClass.ATD:
case Message.NotificationClass.TIEFD:
case Message.NotificationClass.BKRD:
case Message.NotificationClass.POBD:
aMessage.ENINotificationIconString = "../Resources/arrow_up_right_green.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textDepartureNotification;
aMessage.ENINotificationDetailIndex = 8;
break;
case Message.NotificationClass.STAT:
aMessage.ENINotificationIconString = "../Resources/containership.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textShipData;
aMessage.ENINotificationDetailIndex = 9;
break;
case Message.NotificationClass.BPOL:
case Message.NotificationClass.CREW:
case Message.NotificationClass.PAS:
aMessage.ENINotificationIconString = "../Resources/policeman_german.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice;
aMessage.ENINotificationDetailIndex = 10;
break;
case Message.NotificationClass.HAZA:
aMessage.ENINotificationIconString = "../Resources/sign_warning_radiation.png";
aMessage.ENINotificationDetailGroup = Properties.Resources.textDGArrival;
@ -141,14 +152,105 @@ namespace ENI2.DetailViewControls
aMessage.ENINotificationDetailGroup = "unspecified";
break;
}
}
}
// Meldeklassen nach ihrem Vorkommen in den Detailansichten sortieren (SH, 12.5.17)
this.Messages.Sort((a, b) =>
{
if (a.ENINotificationDetailIndex == b.ENINotificationDetailIndex)
return a.MessageNotificationClassDisplay.CompareTo(b.MessageNotificationClassDisplay);
return a.ENINotificationDetailIndex.CompareTo(b.ENINotificationDetailIndex);
});
if (_message != null)
{
// kann das eigentlich passieren??!
}
#region init ATA
// ganz hakelig ich weiß dafür kapiert das gleich jeder
if (this._ataMessage == null)
{
this._ataMessage = this.Core.CreateMessage(Message.NotificationClass.ATA);
this.Messages.Add(this._ataMessage);
this._ataMessage.ENINotificationIconString = "../Resources/arrow_down_right_red.png";
this._ataMessage.ENINotificationDetailGroup = Properties.Resources.textArrivalNotification;
this._ataMessage.ENINotificationDetailIndex = 4;
}
ATA ata = null;
if (this._ataMessage.Elements.Count > 0)
ata = this._ataMessage.Elements[0] as ATA;
if (ata == null)
{
ata = new ATA();
ata.MessageCore = this.Core;
ata.MessageHeader = this._ataMessage;
_ataMessage.Elements.Add(ata);
}
this.dateTimePickerATA.DataContext = ata;
#endregion
#region init ATD
if (this._atdMessage == null)
{
this._atdMessage = this.Core.CreateMessage(Message.NotificationClass.ATD);
this.Messages.Add(this._atdMessage);
this._atdMessage.ENINotificationIconString = "../Resources/arrow_up_right_green.png";
this._atdMessage.ENINotificationDetailGroup = Properties.Resources.textDepartureNotification;
this._atdMessage.ENINotificationDetailIndex = 10;
}
ATD atd = null;
if (this._atdMessage.Elements.Count > 0)
atd = this._atdMessage.Elements[0] as ATD;
if (atd == null)
{
atd = new ATD();
atd.MessageCore = this.Core;
atd.MessageHeader = this._atdMessage;
_atdMessage.Elements.Add(atd);
}
this.dateTimePickerATD.DataContext = atd;
#endregion
#region init NOA_NOD
if (this._noanodMessage == null)
{
this._noanodMessage = this.Core.CreateMessage(Message.NotificationClass.NOA_NOD);
this.Messages.Add(this._noanodMessage);
_noanodMessage.ENINotificationIconString = "../Resources/eye_blue.png";
_noanodMessage.ENINotificationDetailGroup = Properties.Resources.textPortCall;
_noanodMessage.ENINotificationDetailIndex = 1;
}
NOA_NOD noa_nod = null;
if (this._noanodMessage.Elements.Count > 0)
noa_nod = this._noanodMessage.Elements[0] as NOA_NOD;
if (noa_nod == null)
{
noa_nod = new NOA_NOD();
noa_nod.MessageCore = this.Core;
noa_nod.MessageHeader = this._noanodMessage;
_noanodMessage.Elements.Add(noa_nod);
}
this.dateTimePickerETD.DataContext = noa_nod;
this.dateTimePickerETA.DataContext = noa_nod;
#endregion
this.dataGridMessages.ItemsSource = this.Messages;
this._initialized = true;
}
@ -192,5 +294,29 @@ namespace ENI2.DetailViewControls
#endregion
#region Command button event handler
private void buttonStorno_Click(object sender, RoutedEventArgs e)
{
}
private void buttonCopy_Click(object sender, RoutedEventArgs e)
{
}
private void buttonSendPDF_Click(object sender, RoutedEventArgs e)
{
}
private void buttonQueryHIS_Click(object sender, RoutedEventArgs e)
{
}
#endregion
}
}

View File

@ -35,7 +35,7 @@
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>7</ApplicationRevision>
<ApplicationRevision>9</ApplicationRevision>
<ApplicationVersion>3.5.7.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -105,6 +105,8 @@
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
@ -218,7 +220,15 @@
<Compile Include="EditControls\EditSERVDialog.xaml.cs">
<DependentUpon>EditSERVDialog.xaml</DependentUpon>
</Compile>
<Compile Include="EditControls\VisitIdDialog.xaml.cs">
<DependentUpon>VisitIdDialog.xaml</DependentUpon>
</Compile>
<Compile Include="LocalizedLookup.cs" />
<Compile Include="Service References\LockingServiceReference\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="SucheControl.xaml.cs">
<DependentUpon>SucheControl.xaml</DependentUpon>
</Compile>
@ -302,6 +312,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="EditControls\VisitIdDialog.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -344,6 +358,13 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Service References\LockingServiceReference\LockingService.disco" />
<None Include="Service References\LockingServiceReference\configuration91.svcinfo" />
<None Include="Service References\LockingServiceReference\configuration.svcinfo" />
<None Include="Service References\LockingServiceReference\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@ -353,6 +374,16 @@
<EmbeddedResource Include="Properties\Resources.de.resx">
<SubType>Designer</SubType>
</EmbeddedResource>
<None Include="Service References\LockingServiceReference\LockingService.wsdl" />
<None Include="Service References\LockingServiceReference\LockingService.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Service References\LockingServiceReference\LockingService1.xsd">
<SubType>Designer</SubType>
</None>
<None Include="Service References\LockingServiceReference\LockingService2.xsd">
<SubType>Designer</SubType>
</None>
<Resource Include="Resources\printer.png" />
<Resource Include="Resources\floppy_disk_blue.png" />
<Resource Include="Resources\document_plain.png" />
@ -471,7 +502,12 @@
<ItemGroup>
<Resource Include="Resources\bullet_ball_yellow.png" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Service References\LockingServiceReference\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\System.Data.SQLite.Core.1.0.105.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('packages\System.Data.SQLite.Core.1.0.105.0\build\net451\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@ -0,0 +1,60 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.VisitIdDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
Title="Id" Height="192" Width="300" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid Margin="4">
<Grid.RowDefinitions>
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label Name="labelIMO" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textIMO}" />
<Label Name="labelENI" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textENI}" />
<Label Name="labelPoC" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPortCall}" />
<Label Name="labelETA" Grid.Row="3" Grid.Column="0" Content="ETA" />
<xctk:DoubleUpDown x:Name="doubleUpDownIMO" Margin="2" Grid.Row="0" Grid.Column="1"
ClipValueToMinMax="True"
ShowButtonSpinner="False"
AllowSpin="True"
AllowTextInput="True"
IsReadOnly="False"
MouseWheelActiveOnFocus="True"
FormatString="G"
Increment="1"
Maximum="9999999"
Minimum="1000000"
DisplayDefaultValueOnEmptyText="False"
ButtonSpinnerLocation="Right"
ParsingNumberStyle="Integer"
Watermark="Enter IMO"/>
<xctk:DoubleUpDown x:Name="doubleUpDownENI" Margin="2" Grid.Row="1" Grid.Column="1"
ClipValueToMinMax="True"
ShowButtonSpinner="False"
AllowSpin="True"
AllowTextInput="True"
IsReadOnly="False"
MouseWheelActiveOnFocus="True"
FormatString="00000000"
Increment="1"
Minimum="1000000"
Maximum="99999999"
DisplayDefaultValueOnEmptyText="False"
ButtonSpinnerLocation="Right"
ParsingNumberStyle="Integer"
Watermark="Enter ENI"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodePoC" LocodeValue="{Binding PoC, Mode=TwoWay}" />
<DatePicker Name="datePickerETA" Grid.Row="3" Grid.Column="1" Margin="2"/>
</Grid>
</enictrl:EditWindowBase>

View File

@ -0,0 +1,65 @@
// Copyright (c) 2017 schick Informatik
// Description: Mit diesem Dialog können neue Visit/Transit-Id's beantragt werden (DE only)
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using ENI2.Controls;
using bsmd.database;
namespace ENI2.EditControls
{
/// <summary>
/// Interaction logic for VisitIdDialog.xaml
/// </summary>
public partial class VisitIdDialog : EditWindowBase
{
public VisitIdDialog()
{
InitializeComponent();
Loaded += VisitIdDialog_Loaded;
}
private void VisitIdDialog_Loaded(object sender, RoutedEventArgs e)
{
this.OKClicked += VisitIdDialog_OKClicked;
}
private void VisitIdDialog_OKClicked()
{
// Validate entries, write back to model etc pp
if(this.locodePoC.LocodeValue == "ZZNOK")
{
this.Core.IsTransit = true;
this.Core.ETAKielCanal = this.datePickerETA.SelectedDate;
}
else
{
this.Core.IsTransit = false;
this.Core.ETA = this.datePickerETA.SelectedDate;
}
this.Core.PoC = this.locodePoC.LocodeValue;
}
public MessageCore Core { get; set; }
}
}

View File

@ -41,7 +41,7 @@ namespace ENI2
public static Dictionary<string, string> getPortAreasForLocode(string locode)
{
Dictionary<string, string> result = new Dictionary<string, string>();
string query = string.Format("SELECT Code, PortArea FROM INFO_PortArea WHERE Locode = '{0}'", locode);
string query = string.Format("SELECT Code, PortArea FROM INFO_PortArea WHERE Locode = '{0}' ORDER BY PortArea", locode);
SQLiteCommand cmd = new SQLiteCommand(query, _con);
IDataReader reader = cmd.ExecuteReader();
while(reader.Read())

View File

@ -16,7 +16,7 @@
CanExecute="CanExecuteClearCommand" />
</Window.CommandBindings>
<DockPanel>
<DockPanel Name="mainPanel">
<Grid DockPanel.Dock="Top" Height="80" Background="#FFE8F6FF">
<Image x:Name="logoImage" HorizontalAlignment="Left" Height="80" Width="80" Source="Resources/EUREPORT.png" Stretch="Fill" MouseUp="logoImage_MouseUp"/>
<Button x:Name="buttonNewId" Content="{x:Static p:Resources.textNewVisitTransitId}" HorizontalAlignment="Left" Margin="101,25,0,0" VerticalAlignment="Top" Width="110" Height="23" Click="buttonNewTransitIdClick" Background="Transparent" />

View File

@ -1,5 +1,5 @@
// Copyright (c) 2017 schick Informatik
// Description:
// Description: The main application window
//
using System;
@ -7,11 +7,13 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using bsmd.database;
using System.Windows.Controls;
using ENI2.Controls;
using ENI2.EditControls;
namespace ENI2
{
@ -20,25 +22,21 @@ namespace ENI2
/// </summary>
public partial class MainWindow : Window
{
private bool dbConnected;
//private VorgaengeControl vorgaengeControl;
//private AnmeldungenControl anmeldungenControl;
private bool dbConnected;
private SucheControl sucheControl;
private List<MessageCore> anmeldungen = new List<MessageCore>();
private bool efMode = false;
ScaleTransform _transform = new ScaleTransform(1.0, 1.0);
public MainWindow()
{
InitializeComponent();
//this.vorgaengeControl = new VorgaengeControl();
//this.anmeldungenControl = new AnmeldungenControl();
this.sucheControl = new SucheControl();
this.tabSearch.Content = this.sucheControl;
this.sucheControl.buttonSuche.IsDefault = true;
//this.anmeldungenControl.MessageCoreSelected += AnmeldungenControl_MessageCoreSelected;
this.sucheControl.buttonSuche.IsDefault = true;
this.sucheControl.MessageCoreSelected += AnmeldungenControl_MessageCoreSelected;
this.mainPanel.LayoutTransform = this._transform;
}
private void AnmeldungenControl_MessageCoreSelected(MessageCore aMessageCore)
@ -54,47 +52,7 @@ namespace ENI2
}
}
#region Window control click event handler
private void buttonAnmeldungen_Click(object sender, RoutedEventArgs e)
{
if (dbConnected)
{
this.anmeldungen = DBManager.Instance.GetMessageCoresByStatus(MessageCore.BSMDStatus.PREPARE);
/*
this.generalProgressStatus.Value = 0;
this.generalProgressStatus.Maximum = cores.Count;
foreach (MessageCore core in cores)
{
this.generalProgressStatus.Dispatcher.Invoke(() => this.generalProgressStatus.Value++, System.Windows.Threading.DispatcherPriority.Background);
MessageCoreModel mcm = new MessageCoreModel(core);
this.anmeldungen.Add(mcm);
}
*/
}
//anmeldungenControl.dataGrid.ItemsSource = this.anmeldungen;
//mainFrame.Children.Add(this.anmeldungenControl);
}
/*
private void buttonVorgaenge_Click(object sender, RoutedEventArgs e)
{
mainFrame.Children.Clear();
mainFrame.Children.Add(this.vorgaengeControl);
}
*/
/*
private void buttonSuche_Click(object sender, RoutedEventArgs e)
{
mainFrame.Children.Clear();
mainFrame.Children.Add(this.sucheControl);
this.sucheControl.buttonSuche.IsDefault = true;
}
*/
#region Window control click event handler
private void logoImage_MouseUp(object sender, MouseButtonEventArgs e)
{
@ -159,7 +117,15 @@ namespace ENI2
private void buttonNewTransitIdClick(object sender, RoutedEventArgs e)
{
// TODO
MessageCore newCore = new MessageCore();
VisitIdDialog visitIdDialog = new VisitIdDialog();
visitIdDialog.Core = newCore;
if (visitIdDialog.ShowDialog() ?? false)
{
}
}
private void closeButton_Click(object sender, RoutedEventArgs e)
@ -174,5 +140,31 @@ namespace ENI2
#endregion
#region mouse wheel / zooming events
protected override void OnPreviewMouseWheel(MouseWheelEventArgs e)
{
base.OnPreviewMouseWheel(e);
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
{
this._transform.ScaleX += (e.Delta > 0) ? 0.05 : -0.05;
this._transform.ScaleY += (e.Delta > 0) ? 0.05 : -0.05;
}
}
protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
{
base.OnPreviewMouseDown(e);
if (e.ChangedButton == MouseButton.Middle)
{
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
{
this._transform.ScaleX = 1.0;
this._transform.ScaleY = 1.0;
}
}
}
#endregion
}
}

View File

@ -429,6 +429,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Cancel declaration.
/// </summary>
public static string textCancelDeclaration {
get {
return ResourceManager.GetString("textCancelDeclaration", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Confirm deletion.
/// </summary>
@ -457,7 +466,7 @@ namespace ENI2.Properties {
}
/// <summary>
/// Looks up a localized string similar to Gross quantity.
/// Looks up a localized string similar to Gross quantity (t).
/// </summary>
public static string textCargoGrossQuantity {
get {
@ -573,6 +582,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Copy data.
/// </summary>
public static string textCopyData {
get {
return ResourceManager.GetString("textCopyData", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Created.
/// </summary>
@ -582,6 +600,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Create PDF.
/// </summary>
public static string textCreatePDF {
get {
return ResourceManager.GetString("textCreatePDF", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Declarations.
/// </summary>
@ -610,7 +637,7 @@ namespace ENI2.Properties {
}
/// <summary>
/// Looks up a localized string similar to Deplacement summer draught.
/// Looks up a localized string similar to Dead weight summer (t).
/// </summary>
public static string textDeplacementSummerDraught {
get {
@ -987,6 +1014,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Check status.
/// </summary>
public static string textQueryHIS {
get {
return ResourceManager.GetString("textQueryHIS", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Requested position in port of call.
/// </summary>
@ -1140,6 +1176,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Ticket No.
/// </summary>
public static string textTicketNo {
get {
return ResourceManager.GetString("textTicketNo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Towage.
/// </summary>

View File

@ -395,7 +395,7 @@
<value>Fumigated bulk cargo</value>
</data>
<data name="textDeplacementSummerDraught" xml:space="preserve">
<value>Deplacement summer draught</value>
<value>Dead weight summer (t)</value>
</data>
<data name="textPortArea" xml:space="preserve">
<value>Port area</value>
@ -434,7 +434,7 @@
<value>Number of items</value>
</data>
<data name="textCargoGrossQuantity" xml:space="preserve">
<value>Gross quantity</value>
<value>Gross quantity (t)</value>
</data>
<data name="textCargoPortOfLoading" xml:space="preserve">
<value>Port of loading</value>
@ -490,4 +490,19 @@
<data name="textCreated" xml:space="preserve">
<value>Created</value>
</data>
<data name="textCancelDeclaration" xml:space="preserve">
<value>Cancel declaration</value>
</data>
<data name="textCopyData" xml:space="preserve">
<value>Copy data</value>
</data>
<data name="textCreatePDF" xml:space="preserve">
<value>Create PDF</value>
</data>
<data name="textQueryHIS" xml:space="preserve">
<value>Check status</value>
</data>
<data name="textTicketNo" xml:space="preserve">
<value>Ticket No</value>
</data>
</root>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost/bsmd.LockingService/LockingService.svc?wsdl" docRef="http://localhost/bsmd.LockingService/LockingService.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
</discovery>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="LockingService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd0" namespace="http://tempuri.org/" />
<xsd:import schemaLocation="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xsd:import schemaLocation="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="IService_Lock_InputMessage">
<wsdl:part name="parameters" element="tns:Lock" />
</wsdl:message>
<wsdl:message name="IService_Lock_OutputMessage">
<wsdl:part name="parameters" element="tns:LockResponse" />
</wsdl:message>
<wsdl:message name="IService_Unlock_InputMessage">
<wsdl:part name="parameters" element="tns:Unlock" />
</wsdl:message>
<wsdl:message name="IService_Unlock_OutputMessage">
<wsdl:part name="parameters" element="tns:UnlockResponse" />
</wsdl:message>
<wsdl:message name="IService_LockRefresh_InputMessage">
<wsdl:part name="parameters" element="tns:LockRefresh" />
</wsdl:message>
<wsdl:message name="IService_LockRefresh_OutputMessage">
<wsdl:part name="parameters" element="tns:LockRefreshResponse" />
</wsdl:message>
<wsdl:message name="IService_Log_InputMessage">
<wsdl:part name="parameters" element="tns:Log" />
</wsdl:message>
<wsdl:message name="IService_Log_OutputMessage">
<wsdl:part name="parameters" element="tns:LogResponse" />
</wsdl:message>
<wsdl:portType name="IService">
<wsdl:operation name="Lock">
<wsdl:input wsaw:Action="http://tempuri.org/IService/Lock" message="tns:IService_Lock_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IService/LockResponse" message="tns:IService_Lock_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="Unlock">
<wsdl:input wsaw:Action="http://tempuri.org/IService/Unlock" message="tns:IService_Unlock_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IService/UnlockResponse" message="tns:IService_Unlock_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="LockRefresh">
<wsdl:input wsaw:Action="http://tempuri.org/IService/LockRefresh" message="tns:IService_LockRefresh_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IService/LockRefreshResponse" message="tns:IService_LockRefresh_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="Log">
<wsdl:input wsaw:Action="http://tempuri.org/IService/Log" message="tns:IService_Log_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IService/LogResponse" message="tns:IService_Log_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IService" type="tns:IService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Lock">
<soap:operation soapAction="http://tempuri.org/IService/Lock" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Unlock">
<soap:operation soapAction="http://tempuri.org/IService/Unlock" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="LockRefresh">
<soap:operation soapAction="http://tempuri.org/IService/LockRefresh" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Log">
<soap:operation soapAction="http://tempuri.org/IService/Log" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="LockingService">
<wsdl:port name="BasicHttpBinding_IService" binding="tns:BasicHttpBinding_IService">
<soap:address location="http://localhost/bsmd.LockingService/LockingService.svc" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xs:import schemaLocation="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd2" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<xs:element name="Lock">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="messageCoreId" type="q1:guid" />
<xs:element minOccurs="0" name="userId" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LockResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="LockResult" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Unlock">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/" minOccurs="0" name="messageCoreId" type="q2:guid" />
<xs:element minOccurs="0" name="userId" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="UnlockResponse">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="LockRefresh">
<xs:complexType>
<xs:sequence>
<xs:element xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="currentLocks" nillable="true" type="q3:ArrayOfguid" />
<xs:element minOccurs="0" name="userId" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LockRefreshResponse">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="Log">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="msg" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="host" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="userId" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LogResponse">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
<xs:complexType name="ArrayOfguid">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="guid" type="ser:guid" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfguid" nillable="true" type="tns:ArrayOfguid" />
</xs:schema>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="anyType" nillable="true" type="xs:anyType" />
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
<xs:element name="boolean" nillable="true" type="xs:boolean" />
<xs:element name="byte" nillable="true" type="xs:byte" />
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
<xs:element name="decimal" nillable="true" type="xs:decimal" />
<xs:element name="double" nillable="true" type="xs:double" />
<xs:element name="float" nillable="true" type="xs:float" />
<xs:element name="int" nillable="true" type="xs:int" />
<xs:element name="long" nillable="true" type="xs:long" />
<xs:element name="QName" nillable="true" type="xs:QName" />
<xs:element name="short" nillable="true" type="xs:short" />
<xs:element name="string" nillable="true" type="xs:string" />
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
<xs:element name="char" nillable="true" type="tns:char" />
<xs:simpleType name="char">
<xs:restriction base="xs:int" />
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration" />
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid" />
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName" />
<xs:attribute name="Id" type="xs:ID" />
<xs:attribute name="Ref" type="xs:IDREF" />
</xs:schema>

View File

@ -0,0 +1,102 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ENI2.LockingServiceReference {
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="LockingServiceReference.IService")]
public interface IService {
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/Lock", ReplyAction="http://tempuri.org/IService/LockResponse")]
bool Lock(System.Guid messageCoreId, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/Lock", ReplyAction="http://tempuri.org/IService/LockResponse")]
System.Threading.Tasks.Task<bool> LockAsync(System.Guid messageCoreId, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/Unlock", ReplyAction="http://tempuri.org/IService/UnlockResponse")]
void Unlock(System.Guid messageCoreId, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/Unlock", ReplyAction="http://tempuri.org/IService/UnlockResponse")]
System.Threading.Tasks.Task UnlockAsync(System.Guid messageCoreId, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/LockRefresh", ReplyAction="http://tempuri.org/IService/LockRefreshResponse")]
void LockRefresh(System.Guid[] currentLocks, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/LockRefresh", ReplyAction="http://tempuri.org/IService/LockRefreshResponse")]
System.Threading.Tasks.Task LockRefreshAsync(System.Guid[] currentLocks, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/Log", ReplyAction="http://tempuri.org/IService/LogResponse")]
void Log(string msg, string host, string userId);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IService/Log", ReplyAction="http://tempuri.org/IService/LogResponse")]
System.Threading.Tasks.Task LogAsync(string msg, string host, string userId);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public interface IServiceChannel : ENI2.LockingServiceReference.IService, System.ServiceModel.IClientChannel {
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public partial class ServiceClient : System.ServiceModel.ClientBase<ENI2.LockingServiceReference.IService>, ENI2.LockingServiceReference.IService {
public ServiceClient() {
}
public ServiceClient(string endpointConfigurationName) :
base(endpointConfigurationName) {
}
public ServiceClient(string endpointConfigurationName, string remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}
public ServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
base(endpointConfigurationName, remoteAddress) {
}
public ServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress) {
}
public bool Lock(System.Guid messageCoreId, string userId) {
return base.Channel.Lock(messageCoreId, userId);
}
public System.Threading.Tasks.Task<bool> LockAsync(System.Guid messageCoreId, string userId) {
return base.Channel.LockAsync(messageCoreId, userId);
}
public void Unlock(System.Guid messageCoreId, string userId) {
base.Channel.Unlock(messageCoreId, userId);
}
public System.Threading.Tasks.Task UnlockAsync(System.Guid messageCoreId, string userId) {
return base.Channel.UnlockAsync(messageCoreId, userId);
}
public void LockRefresh(System.Guid[] currentLocks, string userId) {
base.Channel.LockRefresh(currentLocks, userId);
}
public System.Threading.Tasks.Task LockRefreshAsync(System.Guid[] currentLocks, string userId) {
return base.Channel.LockRefreshAsync(currentLocks, userId);
}
public void Log(string msg, string host, string userId) {
base.Channel.Log(msg, host, userId);
}
public System.Threading.Tasks.Task LogAsync(string msg, string host, string userId) {
return base.Channel.LogAsync(msg, host, userId);
}
}
}

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="41c8e48a-bb8b-4320-ae4b-0cc80c8e7781" xmlns="urn:schemas-microsoft-com:xml-wcfservicemap">
<ClientOptions>
<GenerateAsynchronousMethods>false</GenerateAsynchronousMethods>
<GenerateTaskBasedAsynchronousMethod>true</GenerateTaskBasedAsynchronousMethod>
<EnableDataBinding>true</EnableDataBinding>
<ExcludedTypes />
<ImportXmlTypes>false</ImportXmlTypes>
<GenerateInternalTypes>false</GenerateInternalTypes>
<GenerateMessageContracts>false</GenerateMessageContracts>
<NamespaceMappings />
<CollectionMappings />
<GenerateSerializableTypes>true</GenerateSerializableTypes>
<Serializer>Auto</Serializer>
<UseSerializerForFaults>true</UseSerializerForFaults>
<ReferenceAllAssemblies>true</ReferenceAllAssemblies>
<ReferencedAssemblies />
<ReferencedDataContractTypes />
<ServiceContractMappings />
</ClientOptions>
<MetadataSources>
<MetadataSource Address="http://localhost/bsmd.LockingService/LockingService.svc" Protocol="http" SourceId="1" />
</MetadataSources>
<Metadata>
<MetadataFile FileName="LockingService.disco" MetadataType="Disco" ID="cf92c075-c2d0-4004-8066-93002ca8e622" SourceId="1" SourceUrl="http://localhost/bsmd.LockingService/LockingService.svc?disco" />
<MetadataFile FileName="LockingService.xsd" MetadataType="Schema" ID="65873fec-1282-4255-9bea-e1f068a8cc8e" SourceId="1" SourceUrl="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd0" />
<MetadataFile FileName="LockingService1.xsd" MetadataType="Schema" ID="814ce36f-ee52-405f-a335-07cfe94e36a9" SourceId="1" SourceUrl="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd2" />
<MetadataFile FileName="LockingService.wsdl" MetadataType="Wsdl" ID="38fe50e2-79ad-46d8-9d71-802c5b022b56" SourceId="1" SourceUrl="http://localhost/bsmd.LockingService/LockingService.svc?wsdl" />
<MetadataFile FileName="LockingService2.xsd" MetadataType="Schema" ID="4c4c1dba-23f8-4271-acdc-84c6fcece9ef" SourceId="1" SourceUrl="http://localhost/bsmd.LockingService/LockingService.svc?xsd=xsd1" />
</Metadata>
<Extensions>
<ExtensionFile FileName="configuration91.svcinfo" Name="configuration91.svcinfo" />
<ExtensionFile FileName="configuration.svcinfo" Name="configuration.svcinfo" />
</Extensions>
</ReferenceGroup>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configurationSnapshot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-wcfconfigurationsnapshot">
<behaviors />
<bindings>
<binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data name=&quot;BasicHttpBinding_IService&quot; /&gt;" bindingType="basicHttpBinding" name="BasicHttpBinding_IService" />
</bindings>
<endpoints>
<endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost/bsmd.LockingService/LockingService.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IService&quot; contract=&quot;LockingServiceReference.IService&quot; name=&quot;BasicHttpBinding_IService&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://localhost/bsmd.LockingService/LockingService.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IService&quot; contract=&quot;LockingServiceReference.IService&quot; name=&quot;BasicHttpBinding_IService&quot; /&gt;" contractName="LockingServiceReference.IService" name="BasicHttpBinding_IService" />
</endpoints>
</configurationSnapshot>

View File

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="eMGCdaXNDDQsA9/yFfyZUioqt/U=">
<bindingConfigurations>
<bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IService">
<properties>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>BasicHttpBinding_IService</serializedValue>
</property>
<property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/openTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/receiveTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/sendTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/allowCookies" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/bypassProxyOnLocal" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/hostNameComparisonMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HostNameComparisonMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>StrongWildcard</serializedValue>
</property>
<property path="/maxBufferPoolSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/maxBufferSize" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>65536</serializedValue>
</property>
<property path="/maxReceivedMessageSize" isComplexType="false" isExplicitlyDefined="true" clrType="System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/proxyAddress" isComplexType="false" isExplicitlyDefined="false" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/readerQuotas" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement</serializedValue>
</property>
<property path="/readerQuotas/maxDepth" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxStringContentLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxArrayLength" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxBytesPerRead" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/readerQuotas/maxNameTableCharCount" isComplexType="false" isExplicitlyDefined="false" clrType="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>0</serializedValue>
</property>
<property path="/textEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.Text.Encoding, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Text.UTF8Encoding</serializedValue>
</property>
<property path="/transferMode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.TransferMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Buffered</serializedValue>
</property>
<property path="/useDefaultWebProxy" isComplexType="false" isExplicitlyDefined="true" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/messageEncoding" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.WSMessageEncoding, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Text</serializedValue>
</property>
<property path="/security" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpSecurityElement</serializedValue>
</property>
<property path="/security/mode" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpSecurityMode, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.HttpTransportSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.HttpTransportSecurityElement</serializedValue>
</property>
<property path="/security/transport/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpClientCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/proxyCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.HttpProxyCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>None</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/policyEnforcement" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.PolicyEnforcement, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Never</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/protectionScenario" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.ProtectionScenario, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>TransportSelected</serializedValue>
</property>
<property path="/security/transport/extendedProtectionPolicy/customServiceNames" isComplexType="true" isExplicitlyDefined="false" clrType="System.Security.Authentication.ExtendedProtection.Configuration.ServiceNameElementCollection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>(Collection)</serializedValue>
</property>
<property path="/security/transport/realm" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/security/message" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.BasicHttpMessageSecurityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.BasicHttpMessageSecurityElement</serializedValue>
</property>
<property path="/security/message/clientCredentialType" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.BasicHttpMessageCredentialType, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>UserName</serializedValue>
</property>
<property path="/security/message/algorithmSuite" isComplexType="false" isExplicitlyDefined="false" clrType="System.ServiceModel.Security.SecurityAlgorithmSuite, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>Default</serializedValue>
</property>
</properties>
</bindingConfiguration>
</bindingConfigurations>
<endpoints>
<endpoint name="BasicHttpBinding_IService" contract="LockingServiceReference.IService" bindingType="basicHttpBinding" address="http://localhost/bsmd.LockingService/LockingService.svc" bindingConfiguration="BasicHttpBinding_IService">
<properties>
<property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>http://localhost/bsmd.LockingService/LockingService.svc</serializedValue>
</property>
<property path="/behaviorConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/binding" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>basicHttpBinding</serializedValue>
</property>
<property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>BasicHttpBinding_IService</serializedValue>
</property>
<property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>LockingServiceReference.IService</serializedValue>
</property>
<property path="/headers" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.AddressHeaderCollectionElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.AddressHeaderCollectionElement</serializedValue>
</property>
<property path="/headers/headers" isComplexType="false" isExplicitlyDefined="true" clrType="System.ServiceModel.Channels.AddressHeaderCollection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>&lt;Header /&gt;</serializedValue>
</property>
<property path="/identity" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.IdentityElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.IdentityElement</serializedValue>
</property>
<property path="/identity/userPrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.UserPrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.UserPrincipalNameElement</serializedValue>
</property>
<property path="/identity/userPrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/servicePrincipalName" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.ServicePrincipalNameElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.ServicePrincipalNameElement</serializedValue>
</property>
<property path="/identity/servicePrincipalName/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/dns" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.DnsElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.DnsElement</serializedValue>
</property>
<property path="/identity/dns/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/rsa" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.RsaElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.RsaElement</serializedValue>
</property>
<property path="/identity/rsa/value" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificate" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.CertificateElement</serializedValue>
</property>
<property path="/identity/certificate/encodedValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificateReference" isComplexType="true" isExplicitlyDefined="false" clrType="System.ServiceModel.Configuration.CertificateReferenceElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>System.ServiceModel.Configuration.CertificateReferenceElement</serializedValue>
</property>
<property path="/identity/certificateReference/storeName" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreName, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>My</serializedValue>
</property>
<property path="/identity/certificateReference/storeLocation" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.StoreLocation, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>LocalMachine</serializedValue>
</property>
<property path="/identity/certificateReference/x509FindType" isComplexType="false" isExplicitlyDefined="false" clrType="System.Security.Cryptography.X509Certificates.X509FindType, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>FindBySubjectDistinguishedName</serializedValue>
</property>
<property path="/identity/certificateReference/findValue" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/identity/certificateReference/isChainIncluded" isComplexType="false" isExplicitlyDefined="false" clrType="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>False</serializedValue>
</property>
<property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue>BasicHttpBinding_IService</serializedValue>
</property>
<property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
<property path="/endpointConfiguration" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<serializedValue />
</property>
</properties>
</endpoint>
</endpoints>
</SavedWcfConfigurationInformation>

View File

@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:local="clr-namespace:ENI2"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800">
@ -63,10 +64,11 @@
<DataGridTextColumn Header="Type" Binding="{Binding HerbergReportType}" IsReadOnly="True" />
<DataGridTextColumn Header="IMO" Binding="{Binding IMO}" IsReadOnly="True" />
<DataGridTextColumn Header="Ship name" Binding="{Binding Shipname}" IsReadOnly="True" />
<DataGridTextColumn Header="ETA" Binding="{Binding ETA , StringFormat=\{0:dd.MM.yyyy HH:mm\}}" IsReadOnly="True" />
<DataGridTextColumn Header="ETA" Binding="{Binding ETA , StringFormat=\{0:dd.MM.yyyy\}}" IsReadOnly="True" />
<DataGridTextColumn Header="Hafen" Binding="{Binding Portname}" IsReadOnly="True" />
<DataGridTextColumn Header="Id" Binding="{Binding DisplayId}" IsReadOnly="True" />
<DataGridTextColumn Header="Status" Binding="{Binding BSMDStatusInternal}" IsReadOnly="True" />
<DataGridTextColumn Header="{x:Static p:Resources.textTicketNo}" Binding="{Binding TicketNo}" IsReadOnly="True" />
<DataGridTextColumn Header="Edited by" Binding="{Binding EditedBy}" IsReadOnly="True" Width="*" />
</DataGrid.Columns>

Binary file not shown.

View File

@ -0,0 +1,5 @@
update MessageCore set TicketNo=char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)

View File

@ -153,7 +153,7 @@ namespace bsmd.ExcelReadService
// construct file path
string fileNameWithPath = Path.Combine(Path.GetDirectoryName(receivedFileName),
string.Format("{0}_{1}.xlsx", this.templateNames[i], Path.GetFileNameWithoutExtension(receivedFileName)));
this.workbooks[i].Worksheets[1].Select(Type.Missing);
// this.workbooks[i].Worksheets[1].Select(Type.Missing);
this.workbooks[i].SaveAs(fileNameWithPath, XlFileFormat.xlOpenXMLWorkbook, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing);

View File

@ -124,12 +124,12 @@ namespace bsmd.ExcelReadService
{
// try to read/import attachment
using (ExcelReader reader = new ExcelReader(attachmentLocalPath))
{
{
try
{
readResult = Util.ProcessSheet(reader, out readMessage, out messageCore);
}
catch(Exception ex)
catch (Exception ex)
{
readMessage = string.Format("{0} Unerwartete Fehlersitutation:Bitte Info an Christin od. Daniel", ex.Message);
}
@ -152,7 +152,7 @@ namespace bsmd.ExcelReadService
string shipname = DBManager.Instance.GetShipNameFromCore(messageCore);
if (shipname.IsNullOrEmpty()) shipname = messageCore.IMO;
if(mailSubject.IsNullOrEmpty())
if (mailSubject.IsNullOrEmpty())
mailSubject = string.Format("{0}: {1}", Properties.Settings.Default.SendEMailSubject, shipname);
// send reply sheet back to sender
@ -169,19 +169,20 @@ namespace bsmd.ExcelReadService
BSMDMail.SendSystemInfo(receiptSubject, receiptText, mailSender);
}
// remove e-Mail
_log.InfoFormat("deleting mail with messageId {0}", messageId);
_log.InfoFormat("mail delete {0}", bsmdPopClient.DeleteMessageByMessageId(messageId) ? "successful" : "failed");
// remove attachment
_log.InfoFormat("removing local file {0}", attachmentLocalPath);
if (!Properties.Settings.Default.TestMode)
File.Delete(attachmentLocalPath);
}
attachmentLocalPath = null;
attachmentLocalPath = null;
}
// remove e-Mail
_log.InfoFormat("deleting mail with messageId {0}", messageId);
_log.InfoFormat("mail delete {0}", bsmdPopClient.DeleteMessageByMessageId(messageId) ? "successful" : "failed");
}
}
}

View File

@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.LockingService", "bsmd.LockingService\bsmd.LockingService.csproj", "{7CD5E5BC-8F70-4DFB-BAAE-FBC91E6C3F33}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bsmd.database", "bsmd.database\bsmd.database.csproj", "{19945AF2-379B-46A5-B27A-303B5EC1D557}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7CD5E5BC-8F70-4DFB-BAAE-FBC91E6C3F33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CD5E5BC-8F70-4DFB-BAAE-FBC91E6C3F33}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CD5E5BC-8F70-4DFB-BAAE-FBC91E6C3F33}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CD5E5BC-8F70-4DFB-BAAE-FBC91E6C3F33}.Release|Any CPU.Build.0 = Release|Any CPU
{19945AF2-379B-46A5-B27A-303B5EC1D557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19945AF2-379B-46A5-B27A-303B5EC1D557}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19945AF2-379B-46A5-B27A-303B5EC1D557}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19945AF2-379B-46A5-B27A-303B5EC1D557}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,73 @@
// Copyright (c) 2017 schick Informatik
// Description:
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
namespace bsmd.LockingService
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
[ServiceContract]
public interface IService
{
/// <summary>
/// Request a lock for a particular core
/// </summary>
/// <returns>true if successful</returns>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
bool Lock(Guid messageCoreId, string userId);
/// <summary>
/// Relinquish lock for a particular core
/// </summary>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void Unlock(Guid messageCoreId, string userId);
/// <summary>
/// To avoid Timeout, send keepalive message
/// </summary>
/// <param name="currentLocks">currently held locks</param>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void LockRefresh(List<Guid> currentLocks, string userId);
/// <summary>
/// send a log message (convenience helper)
/// </summary>
[OperationContract]
[WebGet(BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void Log(string msg, string host, string userId);
}
// Use a data contract as illustrated in the sample below to add composite types to service operations.
[DataContract]
public class CompositeType
{
bool boolValue = true;
string stringValue = "Hello ";
[DataMember]
public bool BoolValue
{
get { return boolValue; }
set { boolValue = value; }
}
[DataMember]
public string StringValue
{
get { return stringValue; }
set { stringValue = value; }
}
}
}

View File

@ -0,0 +1 @@
<%@ ServiceHost Language="C#" Debug="true" Service="bsmd.LockingService.LockingService" CodeBehind="LockingService.svc.cs" %>

View File

@ -0,0 +1,107 @@
// Copyright (c) 2017 schick Informatik
using System;
using System.Collections.Generic;
using log4net;
using bsmd.database;
using System.ServiceModel.Activation;
using System.Timers;
namespace bsmd.LockingService
{
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class LockingService : IService
{
private static ILog _log = LogManager.GetLogger(typeof(LockingService));
private static Dictionary<Guid, LockEntry> lockDict = new Dictionary<Guid, LockEntry>();
private static Timer staleTimer = new Timer(5000); // alle 5 Sekunden prüfen
private const int staleTimeoutSeconds = 120; // wenn sie eine Anwendung 2 Minuten nicht meldet, werden die Locks freigegeben
static LockingService()
{
staleTimer.Elapsed += StaleTimer_Elapsed;
}
private static void StaleTimer_Elapsed(object sender, ElapsedEventArgs e)
{
lock (lockDict)
{
List<Guid> deleteList = new List<Guid>();
foreach (Guid key in lockDict.Keys)
if ((DateTime.Now - lockDict[key].lockAquired).TotalSeconds > staleTimeoutSeconds)
deleteList.Add(key);
foreach (Guid key in deleteList)
{
_log.WarnFormat("Stale remove message core id {0}, User {1}", key, lockDict[key].userId);
lockDict.Remove(key);
}
}
}
private ILog log = LogManager.GetLogger(typeof(LockingService));
public bool Lock(Guid messageCoreId, string userId)
{
if (userId.IsNullOrEmpty()) return false;
bool result = false;
lock (lockDict)
{
if (!lockDict.ContainsKey(messageCoreId))
{
LockEntry le = new LockEntry();
le.lockAquired = DateTime.Now;
le.userId = userId;
lockDict.Add(messageCoreId, le);
result = true;
}
else
{
if (lockDict[messageCoreId].userId == userId)
{
lockDict[messageCoreId].lockAquired = DateTime.Now;
result = true;
}
}
}
return result;
}
public void Unlock(Guid messageCoreId, string userId)
{
if (userId.IsNullOrEmpty()) return;
lock(lockDict)
{
if(lockDict.ContainsKey(messageCoreId))
{
if (lockDict[messageCoreId].userId == userId)
lockDict.Remove(messageCoreId);
}
}
}
public void LockRefresh(List<Guid> currentLocks, string userId)
{
foreach (Guid messageCoreId in currentLocks)
this.Lock(messageCoreId, userId);
}
public void Log(string msg, string host, string userId)
{
log.Info(string.Format("{0} {1}:{2}", host, userId, msg));
}
internal class LockEntry
{
public DateTime lockAquired = DateTime.Now;
public string userId = string.Empty;
}
}
}

View File

@ -0,0 +1,18 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("bsmd.LockingService")]
[assembly: AssemblyDescription("Locking Service for ENI-2 to avoid parallel changes")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7cd5e5bc-8f70-4dfb-baae-fbc91e6c3f33")]

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2"/>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true"/>
</system.webServer>
</configuration>

View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7CD5E5BC-8F70-4DFB-BAAE-FBC91E6C3F33}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>bsmd.LockingService</RootNamespace>
<AssemblyName>bsmd.LockingService</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<UseIISExpress>false</UseIISExpress>
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExcludeGeneratedDebugSymbol>true</ExcludeGeneratedDebugSymbol>
<PublishDatabases>false</PublishDatabases>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="LockingService.svc" />
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\bsmd.database\Properties\AssemblyProductInfo.cs">
<Link>Properties\AssemblyProductInfo.cs</Link>
</Compile>
<Compile Include="..\bsmd.database\Properties\AssemblyProjectInfo.cs">
<Link>Properties\AssemblyProjectInfo.cs</Link>
</Compile>
<Compile Include="..\bsmd.database\Properties\AssemblyProjectKeyInfo.cs">
<Link>Properties\AssemblyProjectKeyInfo.cs</Link>
</Compile>
<Compile Include="LockingService.svc.cs">
<DependentUpon>LockingService.svc</DependentUpon>
</Compile>
<Compile Include="IService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
<Content Include="bsmd.LockingService.licenseheader" />
<Content Include="packages.config" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>
<None Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\bsmd.database\bsmd.database.csproj">
<Project>{19945af2-379b-46a5-b27a-303b5ec1d557}</Project>
<Name>bsmd.database</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>11651</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost/bsmd.LockingService</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@ -0,0 +1,15 @@
extensions: designer.cs generated.cs
extensions: .cs .cpp .h
// Copyright (c) 2017 schick Informatik
// Description:
extensions: .aspx .ascx
<%--
Copyright (c) 2017 schick Informatik
--%>
extensions: .vb
'Sample license text.
extensions: .xml .config .xsd
<!--
Sample license text.
-->

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.8" targetFramework="net452" />
</packages>

View File

@ -1,4 +1,7 @@
using System;
// Copyright (c) 2015-2017 schick Informatik
// Description: Kopfdaten Schiffsanmeldungen
using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
@ -174,6 +177,12 @@ namespace bsmd.database
/// </summary>
public bool CreateExcel { get; set; }
/// <summary>
/// Feld um die OTRS Ticketnummer zu speichern
/// </summary>
[MaxLength(50)]
public string TicketNo { get; set; }
#endregion
#region DatabaseEntity implementation
@ -220,6 +229,7 @@ namespace bsmd.database
scmd.Parameters.AddWithNullableValue("@P25", this.DefaultReportingPartyId);
scmd.Parameters.AddWithValue("@P26", this.CreateExcel ? 1 : 0);
scmd.Parameters.AddWithNullableValue("@P27", this.EditedBy);
scmd.Parameters.AddWithNullableValue("@P28", this.TicketNo);
if (this.IsNew)
{
@ -228,9 +238,10 @@ namespace bsmd.database
string query = string.Format("INSERT INTO {0} (Id, VisitId, TransitId, IMO, ENI, PoC, Portname, ETA, CustomerId, " +
"Previous, Next, IsTransit, Wetris_zz_56_datensatz_id, BSMDStatus, InitialHIS, HerbergFormGuid, " +
"HerbergFormTemplateGuid, HerbergReportType, HerbergEmailcontactReportingVessel, HerbergEmail24HrsContact, " +
"ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming, DefaultReportingPartyId, CreateExcel, EditedBy) VALUES " +
"ETAKielCanal, HerbergRevDate, ReportStatus, SietasSheetVersion, Incoming, DefaultReportingPartyId, CreateExcel, " +
"EditedBy, TicketNo) VALUES " +
"(@ID, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9, @P10, @P11, @P12, @P13, @P14, @P15, @P16, @P17, " +
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27)",
"@P18, @P19, @P20, @P21, @P22, @P23, @P24, @P25, @P26, @P27, @P28)",
this.Tablename);
scmd.CommandText = query;
}
@ -242,8 +253,8 @@ namespace bsmd.database
"Wetris_zz_56_datensatz_id = @P12, BSMDStatus = @P13, InitialHIS = @P14, HerbergFormGuid = @P15, " +
"HerbergFormTemplateGuid = @P16, HerbergReportType = @P17, HerbergEmailContactReportingVessel = @P18, " +
"HerbergEmail24HrsContact = @P19, ETAKielCanal = @P20, HerbergRevDate = @P21, ReportStatus = @P22, " +
"SietasSheetVersion = @P23, Incoming = @P24, DefaultReportingPartyId = @P25, CreateExcel = @P26, EditedBy = @P27 " +
"WHERE Id = @ID", this.Tablename);
"SietasSheetVersion = @P23, Incoming = @P24, DefaultReportingPartyId = @P25, CreateExcel = @P26, EditedBy = @P27, " +
"TicketNo = @P28 WHERE Id = @ID", this.Tablename);
scmd.CommandText = query;
}
}
@ -255,7 +266,7 @@ namespace bsmd.database
"[{0}].[ETA], [{0}].[CustomerId], [{0}].[Previous], [{0}].[Next], [{0}].[IsTransit], [{0}].[Wetris_zz_56_datensatz_id], [{0}].[BSMDStatus], " +
"[{0}].[InitialHIS], [{0}].[HerbergFormGuid], [{0}].[HerbergFormTemplateGuid], [{0}].[HerbergReportType], [{0}].[HerbergEmailContactReportingVessel], " +
"[{0}].[HerbergEmail24HrsContact], [{0}].[ETAKielCanal], [{0}].[HerbergRevDate], [{0}].[ReportStatus], [{0}].[SietasSheetVersion], [{0}].[Incoming], " +
"[{0}].[DefaultReportingPartyId], [{0}].[Created], [{0}].[Changed], [{0}].[CreateExcel], [{0}].[EditedBy] FROM {0} ",
"[{0}].[DefaultReportingPartyId], [{0}].[Created], [{0}].[Changed], [{0}].[CreateExcel], [{0}].[EditedBy], [{0}].[TicketNo] FROM {0} ",
this.Tablename));
switch (filter)
@ -445,6 +456,7 @@ namespace bsmd.database
if (!reader.IsDBNull(27)) core.changed = reader.GetDateTime(27);
if (!reader.IsDBNull(28)) core.CreateExcel = reader.GetBoolean(28);
if (!reader.IsDBNull(29)) core.EditedBy = reader.GetString(29);
if (!reader.IsDBNull(30)) core.TicketNo = reader.GetString(30);
result.Add(core);
}

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
[assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("3.5.8")]
[assembly: AssemblyInformationalVersion("3.5.9")]
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
[assembly: AssemblyTrademark("")]

View File

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

View File

@ -125,6 +125,7 @@
</ItemGroup>
<ItemGroup>
<None Include="..\bsmdKey.snk" />
<None Include="bsmd.database.licenseheader" />
<None Include="packages.config">
<SubType>Designer</SubType>
</None>

View File

@ -0,0 +1,15 @@
extensions: designer.cs generated.cs
extensions: .cs .cpp .h
// Copyright (c) 2015-2017 schick Informatik
// Description:
extensions: .aspx .ascx
<%--
Copyright (c) 2015-2017 schick Informatik
--%>
extensions: .vb
'Sample license text.
extensions: .xml .config .xsd
<!--
Sample license text.
-->