| | |
| | | return all.Where(x => x.ObjectType == ObjectType).OrderBy(x => x.SortCode).ToList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 通过 GroupID 获取 |
| | | /// </summary> |
| | | public List<Model.SpecialProperty> GetByGroupID(long CorpID, long GroupID) |
| | | { |
| | | var all = GetByCorpID(CorpID); |
| | | return all.Where(x => x.GroupID == GroupID).OrderBy(x => x.SortCode).ToList(); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region Insert |
| | |
| | | return bol; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新 GroupID |
| | | /// </summary> |
| | | public bool UpdateGroupID(long CorpID, long ID, long GroupID, long UpdateUserID, DateTime UpdateTime) |
| | | { |
| | | var dal = new DAL.SpecialProperty(); |
| | | var bol = dal.UpdateGroupID(CorpID, ID, GroupID, UpdateUserID, UpdateTime); |
| | | if (bol) |
| | | { |
| | | UpdateCorpCache(CorpID, ID); |
| | | } |
| | | return bol; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region Exist |
| | | |
| | |
| | | return all.Exists(x => x.ID == ID); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断 Identifier 是否存在 |
| | | /// </summary> |
| | | public bool IsExistIdentifier(long CorpID,string ObjectType, string Identifier) |
| | | { |
| | | if (string.IsNullOrEmpty(Identifier)) |
| | | return false; |
| | | var all = GetByObjectType(CorpID,ObjectType); |
| | | return all.Exists(x => x.Identifier == Identifier); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断 Identifier 排除ID是否存在 |
| | | /// </summary> |
| | | public bool IsExistIdentifierExceptID(long CorpID,string ObjectType, string Identifier, long ID) |
| | | { |
| | | if (string.IsNullOrEmpty(Identifier)) |
| | | return false; |
| | | var all = GetByObjectType(CorpID,ObjectType); |
| | | return all.Exists(x => x.Identifier == Identifier && x.ID != ID); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region Delete |
| | | |
| | | /// <summary> |