| | |
| | | #region Exist |
| | | |
| | | /// <summary> |
| | | /// 判断 Code 是否存在 |
| | | /// </summary> |
| | | public bool IsExistCode(string Code) |
| | | { |
| | | if (string.IsNullOrEmpty(Code)) |
| | | { |
| | | return false; |
| | | } |
| | | var all = GetAll(); |
| | | return all.Exists(x => x.Code == Code); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断 Code 是否存在 ExceptID |
| | | /// </summary> |
| | | public bool IsExistCodeExceptID(string Code, long ExceptID) |
| | | { |
| | | if (string.IsNullOrEmpty(Code)) |
| | | { |
| | | return false; |
| | | } |
| | | var all = GetAll(); |
| | | return all.Exists(x => x.Code == Code && x.ID != ExceptID); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断 TagName 是否存在 |
| | | /// </summary> |
| | | public bool IsExistTagName(string TagName) |