diff --git a/ENI2/EditControls/CompareExcelDialog.xaml b/ENI2/EditControls/CompareExcelDialog.xaml
index cf243be2..230bd65a 100644
--- a/ENI2/EditControls/CompareExcelDialog.xaml
+++ b/ENI2/EditControls/CompareExcelDialog.xaml
@@ -28,7 +28,7 @@
-
+
-
+
diff --git a/ENI2/EditControls/CompareExcelDialog.xaml.cs b/ENI2/EditControls/CompareExcelDialog.xaml.cs
index 62bfba7a..a9d4f9f1 100644
--- a/ENI2/EditControls/CompareExcelDialog.xaml.cs
+++ b/ENI2/EditControls/CompareExcelDialog.xaml.cs
@@ -210,5 +210,35 @@ namespace ENI2.EditControls
#endregion
+ #region click on textboxes opens file selection
+
+ private void textBoxSource_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ OpenFileDialog ofd = new OpenFileDialog
+ {
+ Filter = "Excel Files|*.xls;*.xlsx"
+ };
+ if (ofd.ShowDialog() ?? false)
+ {
+ textBoxSource.Text = ofd.FileName;
+ }
+ EnableCompareButton();
+ }
+
+ private void textBoxTarget_PreviewMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ OpenFileDialog ofd = new OpenFileDialog
+ {
+ Filter = "Excel Files|*.xls;*.xlsx"
+ };
+ if (ofd.ShowDialog() ?? false)
+ {
+ textBoxTarget.Text = ofd.FileName;
+ }
+ EnableCompareButton();
+ }
+
+ #endregion
+
}
}
diff --git a/bsmd.database/RuleEngine.cs b/bsmd.database/RuleEngine.cs
index 40b2c78f..9d7f8f10 100644
--- a/bsmd.database/RuleEngine.cs
+++ b/bsmd.database/RuleEngine.cs
@@ -205,7 +205,7 @@ namespace bsmd.database
{
MaxLengthAttribute mla = Attribute.GetCustomAttribute(property, typeof(MaxLengthAttribute)) as MaxLengthAttribute;
bool isStandardML = (mla.MaxLength == 99) || (mla.MaxLength == 100);
- if((value.Length >= 90) && ((mla.MaxLength == value.Length) || isStandardML))
+ if(((value.Length >= 90) && isStandardML) || ((mla.MaxLength == value.Length) && (value.Length > 20) && !isStandardML))
{
// put out a warning this might be truncated
violations.Add(RuleEngine.CreateViolation(ValidationCode.TRUNCATE, property.Name, value, entity.Title, identifier, entity.Tablename));
diff --git a/bsmd.database/ValidationAttribute.cs b/bsmd.database/ValidationAttribute.cs
index 2a9baf85..050ce2c8 100644
--- a/bsmd.database/ValidationAttribute.cs
+++ b/bsmd.database/ValidationAttribute.cs
@@ -37,7 +37,7 @@ namespace bsmd.database
DOT_NO_COMMA,
VESSEL_TYPE,
NOT_NULL_MAX_LEN,
- FRZ,
+ FRZ,
POSITION_COUNT = 22,
STRING_UNNUMBER = 23,
STRING_IMOCLASS = 24,