从山证v2.3.0拷贝
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
namespace YLErp.Modules.EodModule.SettlementModule
|
||||
{
|
||||
/// <summary>
|
||||
/// 结算检查结果
|
||||
/// </summary>
|
||||
public class EodCheckResult
|
||||
{
|
||||
List<string> _errorList;
|
||||
|
||||
public string Step { get; set; }
|
||||
|
||||
public IEnumerable<string> ErrorMessages
|
||||
{
|
||||
get { return _errorList; }
|
||||
}
|
||||
|
||||
public void AppendError(string errorMsg)
|
||||
{
|
||||
if (_errorList == null)
|
||||
{
|
||||
_errorList = new List<string>();
|
||||
}
|
||||
|
||||
_errorList.Add(errorMsg);
|
||||
}
|
||||
|
||||
public void AppendError(string action, string errorMsg)
|
||||
{
|
||||
if (_errorList == null)
|
||||
{
|
||||
_errorList = new List<string>();
|
||||
}
|
||||
|
||||
_errorList.Add(action + "出错," + errorMsg);
|
||||
}
|
||||
|
||||
public EodCheckResult AppendErrors(IEnumerable<string> errors)
|
||||
{
|
||||
if (errors is null || !errors.Any())
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
if (_errorList == null)
|
||||
{
|
||||
_errorList = new List<string>(errors);
|
||||
}
|
||||
else
|
||||
{
|
||||
_errorList.AddRange(errors);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user