20 lines
485 B
C#
20 lines
485 B
C#
|
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
|||
|
|
|||
|
namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
|||
|
{
|
|||
|
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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|