diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj index 27272a54..ac2d14ca 100644 --- a/ENI-2/ENI2/ENI2/ENI2.csproj +++ b/ENI-2/ENI2/ENI2/ENI2.csproj @@ -35,8 +35,8 @@ 3.5.1.0 true publish.html - 3 - 5.1.7.%2a + 0 + 5.2.0.%2a false true true @@ -85,11 +85,14 @@ Properties\app.manifest - DBBB0891995CB133BFEBAA82DFB101EE9701C465 + E2879001C2E0FD9E6735E0585D11C8355DBEF3EA true + + ENI2_2_TemporaryKey.pfx + packages\ExcelDataReader.3.5.0\lib\net45\ExcelDataReader.dll @@ -602,6 +605,7 @@ Settings.settings True + Reference.svcmap diff --git a/ENI-2/ENI2/ENI2/ENI2_2_TemporaryKey.pfx b/ENI-2/ENI2/ENI2/ENI2_2_TemporaryKey.pfx new file mode 100644 index 00000000..a7df50f8 Binary files /dev/null and b/ENI-2/ENI2/ENI2/ENI2_2_TemporaryKey.pfx differ diff --git a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs index 584c83c5..550535ce 100644 --- a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs +++ b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs @@ -514,6 +514,7 @@ namespace ENI2 if (this.userEntity.IsAdmin) { this.buttonUserAdmin.Visibility = Visibility.Visible; + this.sucheControl.AdminMode = true; // this.buttonEditRules.Visibility = Visibility.Visible; // wird aktuell doch nicht so umgesetzt } break; diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs index f5616dd1..0c3ec203 100644 --- a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs +++ b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace ENI2.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -4373,6 +4373,15 @@ namespace ENI2.Properties { } } + /// + /// Looks up a localized string similar to Reset "Cancelled" flag in database. + /// + public static string textUndoCancel { + get { + return ResourceManager.GetString("textUndoCancel", resourceCulture); + } + } + /// /// Looks up a localized string similar to Unlock. /// diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.resx b/ENI-2/ENI2/ENI2/Properties/Resources.resx index 9e7502cf..0533b26d 100644 --- a/ENI-2/ENI2/ENI2/Properties/Resources.resx +++ b/ENI-2/ENI2/ENI2/Properties/Resources.resx @@ -1660,4 +1660,7 @@ entries + + Reset "Cancelled" flag in database + \ No newline at end of file diff --git a/ENI-2/ENI2/ENI2/SucheControl.xaml.cs b/ENI-2/ENI2/ENI2/SucheControl.xaml.cs index 6b620df8..68f264b5 100644 --- a/ENI-2/ENI2/ENI2/SucheControl.xaml.cs +++ b/ENI-2/ENI2/ENI2/SucheControl.xaml.cs @@ -24,6 +24,7 @@ namespace ENI2 private List anmeldungen = new List(); private object searchLock = new object(); private ILog _log = LogManager.GetLogger("SucheControl"); + private MenuItem cancelItem; #region Construction @@ -37,17 +38,51 @@ namespace ENI2 { this.dataGrid.ContextMenu = new ContextMenu(); this.dataGrid.CanUserAddRows = false; + this.dataGrid.ContextMenuOpening += ContextMenu_ContextMenuOpening; MenuItem addItem = new MenuItem(); addItem.Header = Properties.Resources.textCopyClip; addItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) }; addItem.Click += new RoutedEventHandler(this.copyID); this.dataGrid.ContextMenu.Items.Add(addItem); - } + cancelItem = new MenuItem(); + cancelItem.Header = Properties.Resources.textUndoCancel; + cancelItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/delete.png")) }; + cancelItem.Click += CancelItem_Click; + cancelItem.Visibility = Visibility.Collapsed; + this.dataGrid.ContextMenu.Items.Add(cancelItem); + } + + #endregion public event MessageCore.MessageCoreSelectedHandler MessageCoreSelected; + public bool AdminMode { get; set; } + + #region Context menu events + + private void ContextMenu_ContextMenuOpening(object sender, ContextMenuEventArgs e) + { + MessageCore selectedCore = this.dataGrid.SelectedItem as MessageCore; + cancelItem.Visibility = (this.AdminMode && (selectedCore.Cancelled ?? false)) ? Visibility.Visible : Visibility.Collapsed; + } + + private void CancelItem_Click(object sender, RoutedEventArgs e) + { + MessageCore selectedCore = this.dataGrid.SelectedItem as MessageCore; + if(selectedCore.Cancelled ?? false) + { + if(MessageBox.Show("Undo cancel flag?", "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes) + { + selectedCore.Cancelled = false; + DBManager.Instance.Save(selectedCore); + } + } + } + + #endregion + #region event handler searching private void Button_Click(object sender, RoutedEventArgs e) diff --git a/Stundensheet.xlsx b/Stundensheet.xlsx index 761f7ada..7c0a29d1 100644 Binary files a/Stundensheet.xlsx and b/Stundensheet.xlsx differ diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs index ad5850a8..fa20ec3d 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProductInfo.cs @@ -2,6 +2,6 @@ [assembly: AssemblyCompany("schick Informatik")] [assembly: AssemblyProduct("BSMD NSW interface")] -[assembly: AssemblyInformationalVersion("5.1.7")] +[assembly: AssemblyInformationalVersion("5.2.0")] [assembly: AssemblyCopyright("Copyright © 2014-2019 schick Informatik")] [assembly: AssemblyTrademark("")] \ No newline at end of file diff --git a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs index dd20984f..7cb9a222 100644 --- a/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs +++ b/nsw/Source/bsmd.database/Properties/AssemblyProjectInfo.cs @@ -1,4 +1,4 @@ using System.Reflection; -[assembly: AssemblyVersion("5.1.7.*")] +[assembly: AssemblyVersion("5.2.0.*")]