示例#1
0
 public bool Delete(Activity activity)
 {
     if (activity == null)
         return false;
     this.dbContext.Activities.Remove(activity);
     int result = dbContext.SaveChanges();
     return result > 0;
 }
示例#2
0
        public void LogProjectCreation(Project project)
        {
            Activity act = new Activity();
            act.ProjectId = project.Id;
            act.Who = project.Creator;
            act.When = DateTime.Now;
            act.Type = ActivityType.Create | ActivityType.Project;
            repoActivity.Create(act);

            notifyProjectCreation(project);
        }
示例#3
0
        public void LogFileCreation(ProjectFile file)
        {
            Activity act = new Activity();
            act.FileId = file.Id;
            act.ProjectId = file.ProjectId;
            act.Who = file.Creator;
            act.When = DateTime.Now;
            act.Type = ActivityType.Create | ActivityType.File;
            repoActivity.Create(act);

            notifyFileCreation(file);
        }
示例#4
0
        public void LogCommentCreation(Comment newComment)
        {
            Activity act = new Activity();
            act.Who = newComment.Creator;
            act.CommentId = newComment.Id;
            act.ProjectId = newComment.ProjectId;
            act.FileId = newComment.FileId;
            act.When = DateTime.Now;
            act.Type = ActivityType.Create | ActivityType.Comment;
            repoActivity.Create(act);

            notifyCommentCreation(newComment);
        }
示例#5
0
 public bool Create(Activity activity)
 {
     dbContext.Activities.Add(activity);
     int result = dbContext.SaveChanges();
     return (result > 0);
 }