예제 #1
0
        public void SetContributeApprovedInProject(int projectid, int id)
        {
            var rel = Rels.FirstOrDefault(x => x.id == id && x.pageId == projectid && x.relTypeId == 4);

            rel.Approved = true;
            UnitOfWork.SaveChanges();
        }
예제 #2
0
        public Relationship RelToUserToPage(int pageID, string username)
        {
            Relationship _RelToUserToPage = new Relationship();

            RelEntity entity = Rels.FirstOrDefault(r => r.username == username && r.pageId == pageID);

            if (entity != null && entity.pageId != 0)
            {
                _RelToUserToPage = FromEntity.ToRel(entity);
            }

            return(_RelToUserToPage);
        }
예제 #3
0
        public bool RelToUserToPage(int pageID)
        {
            bool _RelToUserToPage = false;

            RelEntity entity = Rels.FirstOrDefault(p => p.username == pageID.ToString());

            _RelToUserToPage = true;

            if (entity != null)
            {
                if (entity.pageId == pageID)
                {
                    _RelToUserToPage = true;
                }
            }

            return(_RelToUserToPage);
        }
예제 #4
0
        public Relationship GetRelById(int id)
        {
            RelEntity entity = Rels.FirstOrDefault(p => p.id == id);

            return(FromEntity.ToRel(entity));
        }