EPLAN_PROD_Plugin/Sinvo.EplanHpD.Plugin.WPFUI/Extension/CheckedModelExt.cs

20 lines
489 B
C#
Raw Normal View History

2024-11-13 13:39:06 +08:00
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
2024-12-05 14:37:31 +08:00
namespace Sinvo.EplanHpD.Plugin.WPFUI.Extension
2024-11-13 13:39:06 +08:00
{
public static class CheckedModelExt
{
public static void SetError(this CheckedModel model, string errorMsg)
{
model.IsError = true;
model.ErrorCount += 1;
if (!string.IsNullOrEmpty(model.CheckedMsg))
{
model.CheckedMsg += "\r\n";
}
model.CheckedMsg += errorMsg;
}
}
}