24 lines
650 B
C#
24 lines
650 B
C#
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
|
|
|
namespace Sinvo.EplanHpD.Plugin.WPFUI.Extension
|
|
{
|
|
public static class CheckedModelExt
|
|
{
|
|
/// <summary>
|
|
/// 设置检查状态
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <param name="errorMsg"></param>
|
|
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;
|
|
}
|
|
}
|
|
}
|