diff --git a/.gitignore b/.gitignore
index 758c1ca..fa68d4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,6 @@ Res/
**/obj
*.pdb
**/dcu
-*.dcu
\ No newline at end of file
+*.dcu
+/Source/.vs/公用控件组V4/v17/*.suo
+/Source/.vs/公用控件组V4/FileContentIndex/*.vsidx
diff --git a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe
index 33ebf61..62cdd49 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Debug/CommonControls/.NET4 示例/Itrycn_Project.exe differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll
index 7bca45c..9a39504 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml b/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml
index 71a7e8c..30dc812 100644
--- a/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml
+++ b/Bin/Debug/CommonControls/.NET4 示例/MyDb.xml
@@ -1449,6 +1449,68 @@
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
文件信息
@@ -8729,6 +8791,24 @@
+
+
+ 将url里的字段分解成表单字典
+
+
+
+
+
+
+
+
+ 根据表单字段名获取值
+
+
+
+
+
+
AES加密解密类
diff --git a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll
index 0920e03..92809c1 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4 示例/MyDb_SQLite.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll
index ee37aa3..436d3e2 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4 示例/RyPrint.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll
index 0d07fdc..b218f12 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryControls.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll
index 5090739..8cf6719 100644
Binary files a/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4 示例/ryUpdate.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.dll b/Bin/Debug/CommonControls/.NET4/MyDb.dll
index 7bca45c..9a39504 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb.dll and b/Bin/Debug/CommonControls/.NET4/MyDb.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb.xml b/Bin/Debug/CommonControls/.NET4/MyDb.xml
index 71a7e8c..30dc812 100644
--- a/Bin/Debug/CommonControls/.NET4/MyDb.xml
+++ b/Bin/Debug/CommonControls/.NET4/MyDb.xml
@@ -1449,6 +1449,68 @@
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
文件信息
@@ -8729,6 +8791,24 @@
+
+
+ 将url里的字段分解成表单字典
+
+
+
+
+
+
+
+
+ 根据表单字段名获取值
+
+
+
+
+
+
AES加密解密类
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll
index 9441822..e737a8e 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_MySQL.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll
index 0920e03..92809c1 100644
Binary files a/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Debug/CommonControls/.NET4/MyDb_SQLite.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/RyPrint.dll b/Bin/Debug/CommonControls/.NET4/RyPrint.dll
index ee37aa3..436d3e2 100644
Binary files a/Bin/Debug/CommonControls/.NET4/RyPrint.dll and b/Bin/Debug/CommonControls/.NET4/RyPrint.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/ryControls.dll b/Bin/Debug/CommonControls/.NET4/ryControls.dll
index 0d07fdc..b218f12 100644
Binary files a/Bin/Debug/CommonControls/.NET4/ryControls.dll and b/Bin/Debug/CommonControls/.NET4/ryControls.dll differ
diff --git a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll
index 5090739..8cf6719 100644
Binary files a/Bin/Debug/CommonControls/.NET4/ryUpdate.dll and b/Bin/Debug/CommonControls/.NET4/ryUpdate.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe
index d128806..6d2df9a 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe and b/Bin/Release/CommonControls/.NET4 示例/Itrycn_Project.exe differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll
index 75c5e57..ce89e4b 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb.xml b/Bin/Release/CommonControls/.NET4 示例/MyDb.xml
index 2f31e49..ff4ff29 100644
--- a/Bin/Release/CommonControls/.NET4 示例/MyDb.xml
+++ b/Bin/Release/CommonControls/.NET4 示例/MyDb.xml
@@ -1449,6 +1449,68 @@
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
文件信息
@@ -8702,6 +8764,24 @@
+
+
+ 将url里的字段分解成表单字典
+
+
+
+
+
+
+
+
+ 根据表单字段名获取值
+
+
+
+
+
+
AES加密解密类
diff --git a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll
index e916c71..71db8a0 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4 示例/MyDb_SQLite.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll
index a8958b2..69fe146 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll and b/Bin/Release/CommonControls/.NET4 示例/RyPrint.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll
index e148efa..8d66768 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/ryControls.dll and b/Bin/Release/CommonControls/.NET4 示例/ryControls.dll differ
diff --git a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll
index 1471e1e..ebbbe36 100644
Binary files a/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4 示例/ryUpdate.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/MyDb.dll b/Bin/Release/CommonControls/.NET4/MyDb.dll
index 75c5e57..ce89e4b 100644
Binary files a/Bin/Release/CommonControls/.NET4/MyDb.dll and b/Bin/Release/CommonControls/.NET4/MyDb.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/MyDb.xml b/Bin/Release/CommonControls/.NET4/MyDb.xml
index 2f31e49..ff4ff29 100644
--- a/Bin/Release/CommonControls/.NET4/MyDb.xml
+++ b/Bin/Release/CommonControls/.NET4/MyDb.xml
@@ -1449,6 +1449,68 @@
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
+
+
+ 根据表单字段名,获取对应的值
+
+
+
+
+
+
文件信息
@@ -8702,6 +8764,24 @@
+
+
+ 将url里的字段分解成表单字典
+
+
+
+
+
+
+
+
+ 根据表单字段名获取值
+
+
+
+
+
+
AES加密解密类
diff --git a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll
index a9c07d5..ee440e6 100644
Binary files a/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll and b/Bin/Release/CommonControls/.NET4/MyDb_MySQL.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll
index e916c71..71db8a0 100644
Binary files a/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll and b/Bin/Release/CommonControls/.NET4/MyDb_SQLite.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/RyPrint.dll b/Bin/Release/CommonControls/.NET4/RyPrint.dll
index a8958b2..69fe146 100644
Binary files a/Bin/Release/CommonControls/.NET4/RyPrint.dll and b/Bin/Release/CommonControls/.NET4/RyPrint.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/ryControls.dll b/Bin/Release/CommonControls/.NET4/ryControls.dll
index e148efa..8d66768 100644
Binary files a/Bin/Release/CommonControls/.NET4/ryControls.dll and b/Bin/Release/CommonControls/.NET4/ryControls.dll differ
diff --git a/Bin/Release/CommonControls/.NET4/ryUpdate.dll b/Bin/Release/CommonControls/.NET4/ryUpdate.dll
index 1471e1e..ebbbe36 100644
Binary files a/Bin/Release/CommonControls/.NET4/ryUpdate.dll and b/Bin/Release/CommonControls/.NET4/ryUpdate.dll differ
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a61f2c2..66557b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,11 @@
-### 2022-02-09更新
+### 2022-02-20更新
+------
+#### MyDbV4 V3.0.2202.2001
+- *.[新增]WebDecode类新增UrlToData和GetParam函数。
+- *.[新增]VarExtension类新增针对GetParam的扩展方法。
+- *.[改进]WebDecode类的IsUrlSafeChar和IntToHex函数改为私有方法。
+
+### 2022-02-09更新
------
#### MyDbV4 V3.0.2202.0901
- *.[改进]新增ToNString扩展函数,支持将数字转换成小数点末尾不带0的字符串。
diff --git a/Source/.vs/公用控件组V4/FileContentIndex/277c22b4-d272-4e5b-a26d-8707a63f6e06.vsidx b/Source/.vs/公用控件组V4/FileContentIndex/277c22b4-d272-4e5b-a26d-8707a63f6e06.vsidx
deleted file mode 100644
index 77ce11b..0000000
Binary files a/Source/.vs/公用控件组V4/FileContentIndex/277c22b4-d272-4e5b-a26d-8707a63f6e06.vsidx and /dev/null differ
diff --git a/Source/.vs/公用控件组V4/FileContentIndex/be56b25f-2f31-4fe9-88fc-0d4c800fdb7c.vsidx b/Source/.vs/公用控件组V4/FileContentIndex/be56b25f-2f31-4fe9-88fc-0d4c800fdb7c.vsidx
deleted file mode 100644
index 7eaff91..0000000
Binary files a/Source/.vs/公用控件组V4/FileContentIndex/be56b25f-2f31-4fe9-88fc-0d4c800fdb7c.vsidx and /dev/null differ
diff --git a/Source/.vs/公用控件组V4/v17/.suo b/Source/.vs/公用控件组V4/v17/.suo
deleted file mode 100644
index 8485624..0000000
Binary files a/Source/.vs/公用控件组V4/v17/.suo and /dev/null differ
diff --git a/Source/MyDb/DbManage/VarExtension.cs b/Source/MyDb/DbManage/VarExtension.cs
index af666df..a96e724 100644
--- a/Source/MyDb/DbManage/VarExtension.cs
+++ b/Source/MyDb/DbManage/VarExtension.cs
@@ -673,5 +673,85 @@ namespace ryCommon
}
catch { return false; }
}
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ ///
+ static public string Get(this Tuple>> input,string Name,string defValue)
+ {
+ try
+ {
+ return RyWeb.WebDecode.GetParam(input, Name, defValue);
+ }
+ catch { return defValue; }
+ }
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ static public string Get(this Tuple>> input, string Name)
+ {
+ return input.Get(Name, "");
+ }
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ ///
+ static public int Get(this Tuple>> input, string Name,int defValue)
+ {
+ return input.Get(Name, defValue.ToString()).ToInt();
+ }
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ ///
+ static public long Get(this Tuple>> input, string Name, long defValue)
+ {
+ return input.Get(Name, defValue.ToString()).ToInt64();
+ }
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ ///
+ static public decimal Get(this Tuple>> input, string Name, decimal defValue)
+ {
+ return input.Get(Name, defValue.ToString()).ToDecimal();
+ }
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ ///
+ static public double Get(this Tuple>> input, string Name, double defValue)
+ {
+ return input.Get(Name, defValue.ToString()).ToDouble();
+ }
+ ///
+ /// 根据表单字段名,获取对应的值
+ ///
+ ///
+ ///
+ ///
+ ///
+ static public bool Get(this Tuple>> input, string Name, bool defValue)
+ {
+ return input.Get(Name, defValue.ToString()).ToBool();
+ }
}
}
diff --git a/Source/MyDb/Properties/AssemblyInfo.cs b/Source/MyDb/Properties/AssemblyInfo.cs
index 41cf9a8..5ac99b7 100644
--- a/Source/MyDb/Properties/AssemblyInfo.cs
+++ b/Source/MyDb/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.0.2202.0901")]
-[assembly: AssemblyFileVersion("3.0.2202.0901")]
\ No newline at end of file
+[assembly: AssemblyVersion("3.0.2202.2001")]
+[assembly: AssemblyFileVersion("3.0.2202.2001")]
\ No newline at end of file
diff --git a/Source/MyDb/RyWeb/WebDecode.cs b/Source/MyDb/RyWeb/WebDecode.cs
index bdc4d6b..0572fdd 100644
--- a/Source/MyDb/RyWeb/WebDecode.cs
+++ b/Source/MyDb/RyWeb/WebDecode.cs
@@ -422,7 +422,7 @@ namespace RyWeb
///
///
///
- public static bool IsUrlSafeChar(char ch)
+ private static bool IsUrlSafeChar(char ch)
{
if ((((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))) || ((ch >= '0') && (ch <= '9')))
{
@@ -446,7 +446,7 @@ namespace RyWeb
///
///
///
- public static char IntToHex(int n)
+ private static char IntToHex(int n)
{
if (n <= 9)
{
@@ -463,5 +463,58 @@ namespace RyWeb
{
return System.Web.HttpUtility.HtmlDecode(str);
}
+ ///
+ /// 将url里的字段分解成表单字典
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static Tuple>> UrlToData(string url)
+ {
+ if (url == null)
+ throw new ArgumentNullException("url");
+ url = url.Trim();
+ try
+ {
+ var split = url.Split(new[] { '?', '&' }, StringSplitOptions.RemoveEmptyEntries);
+ if (split.Length == 1)
+ return new Tuple>>(url, null);
+ //获取前面的URL地址
+ var host = split[0];
+ var pairs = split.Skip(1).Select(s =>
+ {
+ //没有用String.Split防止某些少见Query String中出现多个=,要把后面的无法处理的=全部显示出来
+ var idx = s.IndexOf('=');
+ return new KeyValuePair(Uri.UnescapeDataString(s.Substring(0, idx)), Uri.UnescapeDataString(s.Substring(idx + 1)));
+ }).ToList();
+ return new Tuple>>(host, pairs);
+ }
+ catch (Exception ex)
+ {
+ throw new FormatException("URL格式错误", ex);
+ }
+ }
+ ///
+ /// 根据表单字段名获取值
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string GetParam(Tuple>> decoded, string name,string defValue)
+ {
+ var query = decoded.Item2.Where(key => key.Key == name);
+ if (query != null)
+ {
+ var list = query.ToList();
+ if (list.Count > 0)
+ {
+ return list[0].Value;
+ }
+ else { return defValue; }
+ }
+ else { return defValue; }
+ }
}
}