SourceUpdate() public static method

public static SourceUpdate ( ISource source ) : Source
source ISource
return Source
Esempio n. 1
0
        public static Filter FilterUpdate(Filter filter)
        {
            if (!filter.IsDirty)
            {
                return(filter);
            }

            filter = filter.Save();

            SourceRepository.SourceUpdate(filter.FilterId, SourceType.Filter, filter.Name);

            return(filter);
        }
Esempio n. 2
0
        private static User UserUpdate(User user)
        {
            if (!user.IsDirty)
            {
                return(user);
            }

            user = user.Save();

            SourceRepository.SourceUpdate(user.UserId, SourceType.User, user.Name);

            return(user);
        }
Esempio n. 3
0
        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 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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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 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);
        }
Esempio n. 8
0
        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 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 Source SourceSave(Source source)
        {
            if (!source.IsValid)
            {
                return(source);
            }

            Source result;

            if (source.IsNew)
            {
                result = SourceRepository.SourceInsert(source);
            }
            else
            {
                result = SourceRepository.SourceUpdate(source);
            }

            return(result);
        }
 public static Source SourceUpdate(ISource source)
 {
     return(SourceRepository.SourceUpdate(source.SourceId, source.SourceType, source.SourceName));
 }