コード例 #1
0
        public virtual bool IsOf(string userName)
        {
            bool _isCreatedBy = CreatedBy.ToLower() == userName.ToLower();
            bool _isUpdatedBy = (!LastUpdatedBy.IsNullOrEmptyOrWhiteSpace()) &&
                                (LastUpdatedBy.ToLower() == userName.ToLower());

            if (_isCreatedBy || _isUpdatedBy)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
 public bool IsOwner(string userName)
 {
     return(!string.IsNullOrEmpty(CreatedBy) && CreatedBy.ToLower() == userName.ToLower());
 }