From 8896611bfd24d56e8548a9576efb0ea73f3775f7 Mon Sep 17 00:00:00 2001 From: Shannon Whitley Date: Fri, 30 Apr 2021 20:35:26 -0700 Subject: [PATCH] v1.0.7 - Call API improvements. Rewrites the envelope and body to guard against malformed SOAP docs. - Web Service Operation dropdown now includes autocomplete to lookup operations from long lists. - Updates to various supporting packages. --- Controls/CComboBox.cs | 50 ++++++++++++++++ ERPHelper.csproj | 67 +++++++++++++--------- ERPHelperTests/ERPHelperTests.csproj | 60 ++++++++++++------- ERPHelperTests/app.config | 15 +++++ ERPHelperTests/packages.config | 34 ++++++----- FodyWeavers.xsd | 15 +++-- Forms/WDMainForm.Designer.cs | 5 +- Forms/WDMainForm.cs | 15 +++++ PostBuild.cmd | 2 +- Properties/AssemblyInfo.cs | 6 +- Workday/WDWebService.cs | 86 ++++++++++++++++++---------- app.config | 8 +++ packages.config | 36 ++++++------ 13 files changed, 278 insertions(+), 121 deletions(-) create mode 100644 ERPHelperTests/app.config diff --git a/Controls/CComboBox.cs b/Controls/CComboBox.cs index 721260d..205182b 100644 --- a/Controls/CComboBox.cs +++ b/Controls/CComboBox.cs @@ -10,6 +10,8 @@ namespace ERPHelper { public partial class CComboBox : ComboBox { + public Dictionary SavedDatasource = null; + public void AddWorkdayURLs() { XmlDocument xmlDoc = new XmlDocument(); @@ -52,5 +54,53 @@ public int FindByKey(string key) } return -1; } + + public void TextFilter(object sender, EventArgs e) + { + if(this.SavedDatasource == null) + { + this.SavedDatasource = (Dictionary)(((BindingSource)this.DataSource).DataSource); + } + Dictionary filteredItems = new Dictionary(); + string filter_param = this.Text; + + foreach (KeyValuePair item in this.SavedDatasource) + { + if (item.Value.ToUpper().Contains(filter_param.ToUpper())) + { + filteredItems.Add(item.Key, item.Value); + } + } + + if (filteredItems.Count > 0) + { + this.DataSource = null; + this.DataSource = new BindingSource(filteredItems, null); + } + + if (String.IsNullOrWhiteSpace(filter_param)) + { + this.DataSource = null; + this.DataSource = new BindingSource(this.SavedDatasource, null); + } + + this.DisplayMember = "Value"; + this.ValueMember = "Key"; + this.DroppedDown = true; + Cursor.Current = Cursors.Default; + + // this will ensure that the drop down is as long as the list + this.IntegralHeight = true; + + // remove automatically selected first item + this.SelectedIndex = -1; + + this.Text = filter_param; + + // set the position of the cursor + this.SelectionStart = filter_param.Length; + this.SelectionLength = 0; + } + } } diff --git a/ERPHelper.csproj b/ERPHelper.csproj index d6e23eb..7daebd1 100644 --- a/ERPHelper.csproj +++ b/ERPHelper.csproj @@ -1,6 +1,6 @@  - + Debug x86 @@ -70,11 +70,11 @@ OnBuildSuccess - - packages\Costura.Fody.5.0.2\lib\netstandard1.0\Costura.dll + + packages\Costura.Fody.5.3.0\lib\netstandard1.0\Costura.dll - - packages\HtmlAgilityPack.1.11.31\lib\Net45\HtmlAgilityPack.dll + + packages\HtmlAgilityPack.1.11.33\lib\Net45\HtmlAgilityPack.dll @@ -85,8 +85,8 @@ packages\Octokit.0.50.0\lib\net46\Octokit.dll - - packages\Saxon-HE.10.3.0\lib\net40\saxon-he-api-10.3.dll + + packages\Saxon-HE.10.5.0\lib\net40\saxon-he-api-10.5.dll @@ -94,15 +94,18 @@ True True + + packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + - - packages\System.Console.4.3.0\lib\net46\System.Console.dll + + packages\System.Console.4.3.1\lib\net46\System.Console.dll True True - - packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll + + packages\System.Diagnostics.DiagnosticSource.5.0.1\lib\net46\System.Diagnostics.DiagnosticSource.dll packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll @@ -151,9 +154,11 @@ True True - - - packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll + + packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll True True @@ -163,18 +168,24 @@ True + + packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll True True - - packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll + + packages\System.Runtime.4.3.1\lib\net462\System.Runtime.dll True True - - packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll + + packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll + + + packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll True True @@ -190,7 +201,7 @@ - packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll + packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net463\System.Security.Cryptography.Algorithms.dll True True @@ -204,14 +215,14 @@ True True - - packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + packages\System.Security.Cryptography.X509Certificates.4.3.2\lib\net461\System.Security.Cryptography.X509Certificates.dll True True - packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll + packages\System.Text.RegularExpressions.4.3.1\lib\net463\System.Text.RegularExpressions.dll True True @@ -220,7 +231,7 @@ - packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll + packages\System.Xml.ReaderWriter.4.3.1\lib\net46\System.Xml.ReaderWriter.dll True True @@ -358,14 +369,18 @@ call "$(ProjectDir)PostBuild.cmd" "$(ConfigurationName)" "$(PlatformName)" - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + + + + +