static private FeedAdd ( string action, Hour hour ) : void | ||
action | string | |
hour | Hour | |
리턴 | void |
public static Sprint SprintInsert(Sprint sprint) { sprint = sprint.Save(); SourceRepository.SourceAdd(sprint.SprintId, SourceType.Sprint, sprint.Name); FeedRepository.FeedAdd(FeedAction.Created, sprint); return(sprint); }
public static ProjectUser ProjectUserInsert(ProjectUser projectUser) { projectUser = projectUser.Save(); SourceRepository.SourceAdd(projectUser.ProjectUserMemberId, SourceType.ProjectUser, string.Empty); FeedRepository.FeedAdd(FeedAction.Created, projectUser); return(projectUser); }
public static Hour HourInsert(Hour hour) { hour = hour.Save(); SourceRepository.SourceAdd(hour.HourId, SourceType.Hour, hour.Date.ToShortDateString()); FeedRepository.FeedAdd(FeedAction.Created, hour); return(hour); }
public static Story StoryInsert(Story story) { story = story.Save(); SourceRepository.SourceAdd(story.StoryId, SourceType.Story, story.StoryId.ToString()); FeedRepository.FeedAdd(FeedAction.Created, story); return(story); }
public static Status StatusInsert(Status status) { status = status.Save(); SourceRepository.SourceAdd(status.StatusId, SourceType.Status, status.Name); FeedRepository.FeedAdd(FeedAction.Created, status); return(status); }
public static Note NoteInsert(Note note) { note = note.Save(); SourceRepository.SourceAdd(note.NoteId, SourceType.Note, note.Body); FeedRepository.FeedAdd(FeedAction.Created, note); return(note); }
public static bool StatusDelete(Status status) { Status.DeleteStatus( new StatusDataCriteria { StatusId = status.StatusId }); FeedRepository.FeedAdd(FeedAction.Deleted, status); return(true); }
public static bool NoteDelete(Note note) { Note.DeleteNote( new NoteDataCriteria { NoteId = note.NoteId }); FeedRepository.FeedAdd(FeedAction.Deleted, note); return(true); }
public static Project ProjectInsert(Project project) { project = project.Save(); SourceRepository.SourceAdd(project.ProjectId, SourceType.Project, project.Name); FeedRepository.FeedAdd(FeedAction.Created, project); ProjectUserRepository.ProjectUserAdd( project.ProjectId, ((IBusinessIdentity)Csla.ApplicationContext.User.Identity).UserId, Role.Owner, true); return(project); }
public static bool SprintDelete(Sprint sprint) { ProjectUserRepository.AuthorizeProjectUser(sprint.ProjectId); Sprint.DeleteSprint( new SprintDataCriteria { SprintId = sprint.SprintId }); FeedRepository.FeedAdd(FeedAction.Deleted, sprint); return(true); }
public static bool ProjectDelete(Project project) { ProjectUserRepository.AuthorizeProjectUser(project.ProjectId); Project.DeleteProject( new ProjectDataCriteria { ProjectId = project.ProjectId }); FeedRepository.FeedAdd(FeedAction.Deleted, project); return(true); }
public static bool StoryDelete(Story story) { ProjectUserRepository.AuthorizeProjectUser(story.ProjectId); Story.DeleteStory( new StoryDataCriteria { StoryId = story.StoryId }); FeedRepository.FeedAdd(FeedAction.Deleted, story); return(true); }
public static bool HourDelete(Hour hour) { Hour.DeleteHour( new HourDataCriteria { HourId = hour.HourId }); StoryRepository.StoryUpdateDuration(hour.StoryId); FeedRepository.FeedAdd(FeedAction.Deleted, hour); return(true); }
public static Hour HourUpdate(Hour hour) { if (!hour.IsDirty) { return(hour); } hour = hour.Save(); SourceRepository.SourceUpdate(hour.HourId, SourceType.Hour, hour.Date.ToShortDateString()); FeedRepository.FeedAdd(FeedAction.Edited, hour); return(hour); }
public static ProjectUser ProjectUserUpdate(ProjectUser projectUser) { if (!projectUser.IsDirty) { return(projectUser); } projectUser = projectUser.Save(); SourceRepository.SourceUpdate(projectUser.ProjectUserMemberId, SourceType.ProjectUser, string.Empty); FeedRepository.FeedAdd(FeedAction.Edited, projectUser); return(projectUser); }
public static Story StoryUpdate(Story story) { if (!story.IsDirty) { return(story); } story = story.Save(); SourceRepository.SourceUpdate(story.StoryId, SourceType.Story, story.StoryId.ToString()); FeedRepository.FeedAdd(FeedAction.Edited, story); return(story); }
public static Sprint SprintUpdate(Sprint sprint) { if (!sprint.IsDirty) { return(sprint); } sprint = sprint.Save(); SourceRepository.SourceUpdate(sprint.SprintId, SourceType.Sprint, sprint.Name); FeedRepository.FeedAdd(FeedAction.Edited, sprint); return(sprint); }
public static Note NoteUpdate(Note note) { if (!note.IsDirty) { return(note); } note = note.Save(); SourceRepository.SourceUpdate(note.NoteId, SourceType.Note, note.Body); FeedRepository.FeedAdd(FeedAction.Edited, note); return(note); }
public static Project ProjectUpdate(Project project) { if (!project.IsDirty) { return(project); } ProjectUserRepository.AuthorizeProjectUser(project.ProjectId); project = project.Save(); SourceRepository.SourceUpdate(project.ProjectId, SourceType.Project, project.Name); FeedRepository.FeedAdd(FeedAction.Edited, project); return(project); }
public static Status StatusUpdate(Status status) { if (!status.IsDirty) { return(status); } ProjectUserRepository.AuthorizeProjectUser(status.ProjectId); status = status.Save(); SourceRepository.SourceUpdate(status.StatusId, SourceType.Status, status.Name); FeedRepository.FeedAdd(FeedAction.Edited, status); return(status); }
public static bool ProjectUserDelete(ProjectUser projectUser) { ProjectUserRepository.AuthorizeProjectUser(projectUser.ProjectId); if (ProjectUserRepository.ProjectUserFetch( projectUser.ProjectId, projectUser.UserId).RoleId == (int)Role.Owner) { throw new NotSupportedException("You cannot delete the owner of a project"); } ProjectUser.DeleteProjectUser( new ProjectUserMemberDataCriteria { ProjectUserMemberId = projectUser.ProjectUserMemberId }); FeedRepository.FeedAdd(FeedAction.Deleted, projectUser); return(true); }