3.6.4.0 Neue ENI-2 Version (Locking und einen Haufen Kleinigkeiten)
This commit is contained in:
parent
130d8c608e
commit
c64ae501ac
@ -27,7 +27,8 @@
|
||||
<value>60</value>
|
||||
</setting>
|
||||
<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>
|
||||
<!--value>Data Source=(localdb)\Projects;Initial Catalog=nsw;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</value-->
|
||||
</setting>
|
||||
</ENI2.Properties.Settings>
|
||||
</applicationSettings>
|
||||
|
||||
@ -9,7 +9,6 @@ using System.Windows.Controls;
|
||||
|
||||
using bsmd.database;
|
||||
using ENI2.DetailViewControls;
|
||||
using ENI2.LockingServiceReference;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
@ -38,6 +37,8 @@ namespace ENI2
|
||||
|
||||
public bool LockedByOtherUser { get; set; }
|
||||
|
||||
public ReportingParty LockedBy { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction
|
||||
@ -119,6 +120,9 @@ namespace ENI2
|
||||
detailControl.Initialize();
|
||||
detailControl.IsEnabled = !this.LockedByOtherUser;
|
||||
|
||||
if (!detailControl.IsEnabled && (detailControl is OverViewDetailControl))
|
||||
((OverViewDetailControl)detailControl).ShowLockedBy(this.LockedBy);
|
||||
|
||||
controlCache.Add(mg.MessageGroupControlType, detailControl);
|
||||
this.buttonSave.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
@ -292,6 +292,16 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public void ShowLockedBy(ReportingParty reportingParty)
|
||||
{
|
||||
this.stackPanelLock.Visibility = Visibility.Visible;
|
||||
this.textBlockLockUserName.Text = reportingParty.FirstName + " " + reportingParty.LastName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private methods
|
||||
|
||||
private void jumpToMessage(Message message)
|
||||
@ -441,6 +451,5 @@ namespace ENI2.DetailViewControls
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>2</ApplicationRevision>
|
||||
<ApplicationVersion>3.6.3.%2a</ApplicationVersion>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>3.6.4.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -82,14 +82,17 @@ namespace ENI2
|
||||
// TODO: wenn der Locking Service nicht erreichbar ist sollte das Ganze trotzdem noch irgendwie funktionieren
|
||||
_log.ErrorFormat("LockingService.Lock: {0}", ex.Message);
|
||||
}
|
||||
bool iDidLockIt = (lockedUserId == Guid.Empty);
|
||||
bool iDidLockIt = (lockedUserId == Guid.Empty);
|
||||
|
||||
searchResultItem.TabClosing += SearchResultItem_TabClosing;
|
||||
DateTime? eta = aMessageCore.IsTransit ? aMessageCore.ETAKielCanal : aMessageCore.ETA;
|
||||
searchResultItem.SetHeaderText(string.Format("{0} [{1}-{2}]", aMessageCore.Shipname, aMessageCore.PoC, eta.HasValue ? eta.Value.ToShortDateString() : ""),
|
||||
iDidLockIt);
|
||||
|
||||
DetailRootControl drc = new DetailRootControl(aMessageCore);
|
||||
drc.LockedByOtherUser = !iDidLockIt;
|
||||
drc.LockedByOtherUser = !iDidLockIt;
|
||||
drc.LockedBy = iDidLockIt ? this.userEntity : DBManager.Instance.GetReportingPartyDict()[lockedUserId];
|
||||
|
||||
searchResultItem.Content = drc;
|
||||
this.mainFrame.Items.Add(searchResultItem);
|
||||
Dispatcher.BeginInvoke((Action)(() => this.mainFrame.SelectedIndex = (this.mainFrame.Items.Count - 1)));
|
||||
@ -140,7 +143,7 @@ namespace ENI2
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (Debugger.IsAttached) this.busyIndicator.IsBusy = false; // not for me :-P
|
||||
// if (Debugger.IsAttached) this.busyIndicator.IsBusy = false; // not for me :-P
|
||||
|
||||
this.dbConnected = DBManager.Instance.Connect(Properties.Settings.Default.ConnectionString);
|
||||
labelGeneralStatus.Text = dbConnected ? "DB Connected" : "DB Connect failed";
|
||||
|
||||
Binary file not shown.
@ -99,6 +99,7 @@
|
||||
<Content Include="..\bsmdKey.snk">
|
||||
<Link>bsmdKey.snk</Link>
|
||||
</Content>
|
||||
<Content Include="log4net.config" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
|
||||
[assembly: AssemblyCompany("Informatikbüro Daniel Schick")]
|
||||
[assembly: AssemblyProduct("BSMD NSW interface")]
|
||||
[assembly: AssemblyInformationalVersion("3.6.3")]
|
||||
[assembly: AssemblyInformationalVersion("3.6.4")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2017 Informatikbüro Daniel Schick. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.6.3.*")]
|
||||
[assembly: AssemblyVersion("3.6.4.*")]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user