Commit 5847a2b4 by 陶然

优化

parent b4161960
...@@ -19,5 +19,5 @@ using System.Runtime.InteropServices; ...@@ -19,5 +19,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("Kivii,K5")] [assembly: AssemblyTrademark("Kivii,K5")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyVersion("5.4.2023.8050")] [assembly: AssemblyVersion("5.4.2023.10260")]
[assembly: AssemblyFileVersion("5.4.2023.8050")] [assembly: AssemblyFileVersion("5.4.2023.10260")]
...@@ -50,7 +50,8 @@ namespace Kivii.Finances.Addons ...@@ -50,7 +50,8 @@ namespace Kivii.Finances.Addons
var eType = sheet.Cells[i, 4].Value; var eType = sheet.Cells[i, 4].Value;
if (eType == null) if (eType == null)
{ {
throw new Exception($"Excel第{i}行第4列不可为空,请选择指定类型!"); eType = PaymentType.Bank;
//throw new Exception($"Excel第{i}行第4列不可为空,请选择指定类型!");
} }
if(!Enum.TryParse(eType.ToString(), true, out PaymentType type)) if(!Enum.TryParse(eType.ToString(), true, out PaymentType type))
{ {
...@@ -76,7 +77,8 @@ namespace Kivii.Finances.Addons ...@@ -76,7 +77,8 @@ namespace Kivii.Finances.Addons
var eCurrency = sheet.Cells[i, 6].Value; var eCurrency = sheet.Cells[i, 6].Value;
if (eCurrency == null) if (eCurrency == null)
{ {
throw new Exception($"Excel第{i}行第6列不可为空,请传入货币单位!"); eCurrency = CurrencyUnit.CNY;
//throw new Exception($"Excel第{i}行第6列不可为空,请传入货币单位!");
} }
if (!Enum.TryParse(eCurrency.ToString(),true, out CurrencyUnit currency)) if (!Enum.TryParse(eCurrency.ToString(),true, out CurrencyUnit currency))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment