105040 修复读取变量为空时的报错

This commit is contained in:
lihanbo 2024-10-26 14:01:32 +08:00
parent f41e0e39b4
commit 21035167c8
1 changed files with 3 additions and 2 deletions

View File

@ -159,7 +159,7 @@ public partial class MainViewModel : INotifyPropertyChanged
public Task<List<ReportModel>> LoadReportDataAsync(IEnumerable<BaseReportEntry> data, List<ReportColumn> columns)
{
var savedFlagType = FormUISettings.Instance.GetValue("FlagType");
var savedFlagType = FormUISettings.Instance.GetValue("FlagType") ?? WireFlagType.Dual;
if (Enum.IsDefined(typeof(WireFlagType), savedFlagType))
{
FlagType = (WireFlagType)Enum.Parse(typeof(WireFlagType), savedFlagType.ToString());
@ -454,7 +454,8 @@ public partial class MainViewModel : INotifyPropertyChanged
RearTerminalStripLength = stuffedDataModel.RearStripLength,
InsulationModel = stuffedDataModel.Insulation?.Specification,
InsulationMaterialNo = stuffedDataModel.Insulation?.MaterialCode,
OrderDate = nowDateStr
OrderDate = nowDateStr,
IsIgnoreError = stuffedDataModel.IsIgnore ? "是" : string.Empty
};
seqNo++;
dataList.Add(exportModel);