diff --git a/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs b/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
index 8c3bd618..199612d4 100644
--- a/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/BorderPoliceDetailControl.xaml.cs
@@ -35,6 +35,7 @@ namespace ENI2.DetailViewControls
{
InitializeComponent();
this.Loaded += BorderPoliceDetailControl_Loaded;
+
}
private void BorderPoliceDetailControl_Loaded(object sender, RoutedEventArgs e)
diff --git a/ENI2/DetailViewControls/OverViewDetailControl.xaml b/ENI2/DetailViewControls/OverViewDetailControl.xaml
index 1ff5c4b8..3cf831f3 100644
--- a/ENI2/DetailViewControls/OverViewDetailControl.xaml
+++ b/ENI2/DetailViewControls/OverViewDetailControl.xaml
@@ -83,16 +83,16 @@
-
+
-
+
@@ -105,6 +105,9 @@
+
diff --git a/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
index 8299f901..0b041cdd 100644
--- a/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
+++ b/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
@@ -713,6 +713,20 @@ namespace ENI2.DetailViewControls
this.OnRequestValidate();
}
+ private void buttonExcelImport_Click(object sender, RoutedEventArgs e)
+ {
+ SelectImportClassesDialog sicd = new SelectImportClassesDialog();
+ if((sicd.ShowDialog() ?? false) && (sicd.SelectedClasses.Count > 0))
+ {
+ // get here if user selected some classes
+
+ // start importer
+
+ // show import result?
+
+ }
+ }
+
#endregion
#region mouse wheel
@@ -725,6 +739,6 @@ namespace ENI2.DetailViewControls
}
#endregion
-
+
}
}
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 9c80bf3a..f3d60710 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -37,7 +37,7 @@
true
publish.html
0
- 6.6.3.0
+ 6.7.0.0
false
true
true
@@ -358,6 +358,9 @@
NewWithIdDialog.xaml
+
+ SelectImportClassesDialog.xaml
+
ShowIdDialog.xaml
@@ -607,6 +610,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/ENI2/EditControls/SelectImportClassesDialog.xaml b/ENI2/EditControls/SelectImportClassesDialog.xaml
new file mode 100644
index 00000000..aad5b128
--- /dev/null
+++ b/ENI2/EditControls/SelectImportClassesDialog.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI2/EditControls/SelectImportClassesDialog.xaml.cs b/ENI2/EditControls/SelectImportClassesDialog.xaml.cs
new file mode 100644
index 00000000..c911732a
--- /dev/null
+++ b/ENI2/EditControls/SelectImportClassesDialog.xaml.cs
@@ -0,0 +1,109 @@
+// Copyright (c) 2017-today schick Informatik
+// Description: Select classes for import
+// Returns: Array of selected classes as property
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+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 bsmd.database;
+
+namespace ENI2.EditControls
+{
+ ///
+ /// Interaction logic for SelectImportClassesDialog.xaml
+ ///
+ public partial class SelectImportClassesDialog : ENI2.Controls.EditWindowBase
+ {
+ private List _selectClasses = new List();
+ private List _selectedClasses = new List();
+
+ public SelectImportClassesDialog()
+ {
+ InitializeComponent();
+ this.Loaded += SelectImportClassesDialog_Loaded;
+ }
+
+ public List SelectedClasses
+ {
+ get { return _selectedClasses; }
+ }
+
+ private void SelectImportClassesDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+
+ foreach(bsmd.database.Message.NotificationClass notificationClass in Enum.GetValues(typeof(bsmd.database.Message.NotificationClass)))
+ {
+ SelectClass sc = new SelectClass();
+ sc.Name = Enum.GetName(typeof(bsmd.database.Message.NotificationClass), notificationClass);
+ sc.Class = notificationClass;
+ sc.IsSelected = false;
+ _selectClasses.Add(sc);
+ }
+ _selectClasses.Sort();
+ this.checkListBoxClasses.ItemsSource = _selectClasses;
+ this.OKClicked += SelectImportClassesDialog_OKClicked;
+ }
+
+ private void SelectImportClassesDialog_OKClicked()
+ {
+ foreach(SelectClass sc in _selectClasses)
+ {
+ if (sc.IsSelected) _selectedClasses.Add(sc.Class);
+ }
+ }
+
+ class SelectClass : IComparable, INotifyPropertyChanged
+ {
+ private bool _isSelected;
+ public string Name { get; set; }
+ public bsmd.database.Message.NotificationClass Class { get; set; }
+ public bool IsSelected
+ {
+ get { return _isSelected; }
+ set
+ {
+ _isSelected = value;
+ OnPropertyChanged("IsSelected");
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ protected void OnPropertyChanged(string propertyName)
+ {
+ if(PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ public int CompareTo(object obj)
+ {
+ return Name.CompareTo(((SelectClass)obj).Name);
+ }
+ }
+
+ private void buttonAll_Click(object sender, RoutedEventArgs e)
+ {
+ foreach (SelectClass sc in _selectClasses)
+ sc.IsSelected = true;
+ }
+
+ private void buttonNone_Click(object sender, RoutedEventArgs e)
+ {
+ foreach (SelectClass sc in _selectClasses)
+ sc.IsSelected = false;
+ }
+ }
+}
diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index 2a6ada13..88176f20 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -2081,6 +2081,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Excel Import.
+ ///
+ public static string textExcelImport {
+ get {
+ return ResourceManager.GetString("textExcelImport", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Excepted quantities.
///
@@ -4025,6 +4034,33 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Select all.
+ ///
+ public static string textSelectAll {
+ get {
+ return ResourceManager.GetString("textSelectAll", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Select classes to import.
+ ///
+ public static string textSelectImportClasses {
+ get {
+ return ResourceManager.GetString("textSelectImportClasses", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Select none.
+ ///
+ public static string textSelectNone {
+ get {
+ return ResourceManager.GetString("textSelectNone", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Send date.
///
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index f565d10c..df401872 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -1738,4 +1738,16 @@
..\Resources\undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Excel Import
+
+
+ Select all
+
+
+ Select classes to import
+
+
+ Select none
+
\ No newline at end of file
diff --git a/bsmd.database/Properties/AssemblyProductInfo.cs b/bsmd.database/Properties/AssemblyProductInfo.cs
index 7e64b4ae..57cc0075 100644
--- a/bsmd.database/Properties/AssemblyProductInfo.cs
+++ b/bsmd.database/Properties/AssemblyProductInfo.cs
@@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
-[assembly: AssemblyInformationalVersion("6.6.0")]
+[assembly: AssemblyInformationalVersion("6.7.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2021 schick Informatik")]
[assembly: AssemblyTrademark("")]
\ No newline at end of file
diff --git a/bsmd.database/Properties/AssemblyProjectInfo.cs b/bsmd.database/Properties/AssemblyProjectInfo.cs
index d2165406..f6f7120a 100644
--- a/bsmd.database/Properties/AssemblyProjectInfo.cs
+++ b/bsmd.database/Properties/AssemblyProjectInfo.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-[assembly: AssemblyVersion("6.6.0.*")]
+[assembly: AssemblyVersion("6.7.0.*")]