SourceAdd() public static method

public static SourceAdd ( ISource source ) : Source
source ISource
return Source
Esempio n. 1
0
        public static Filter FilterInsert(Filter filter)
        {
            filter = filter.Save();

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

            return(filter);
        }
Esempio n. 2
0
        private static User UserInsert(User user)
        {
            user = user.Save();

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

            return(user);
        }
Esempio n. 3
0
        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 Hour HourInsert(Hour hour)
        {
            hour = hour.Save();

            SourceRepository.SourceAdd(hour.HourId, SourceType.Hour, hour.Date.ToShortDateString());

            FeedRepository.FeedAdd(FeedAction.Created, hour);

            return(hour);
        }
Esempio n. 5
0
        public static Status StatusInsert(Status status)
        {
            status = status.Save();

            SourceRepository.SourceAdd(status.StatusId, SourceType.Status, status.Name);

            FeedRepository.FeedAdd(FeedAction.Created, status);

            return(status);
        }
Esempio n. 6
0
        public static Sprint SprintInsert(Sprint sprint)
        {
            sprint = sprint.Save();

            SourceRepository.SourceAdd(sprint.SprintId, SourceType.Sprint, sprint.Name);

            FeedRepository.FeedAdd(FeedAction.Created, sprint);

            return(sprint);
        }
Esempio n. 7
0
        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 ProjectUser ProjectUserInsert(ProjectUser projectUser)
        {
            projectUser = projectUser.Save();

            SourceRepository.SourceAdd(projectUser.ProjectUserMemberId, SourceType.ProjectUser, string.Empty);

            FeedRepository.FeedAdd(FeedAction.Created, projectUser);

            return(projectUser);
        }
        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 Source SourceUpdate(int sourceId, SourceType sourceType, string name)
        {
            Source source;

            try
            {
                source = SourceRepository.SourceFetch(sourceId, sourceType);

                source.Name = name;

                source = SourceRepository.SourceSave(source);
            }
            catch
            {
                source = SourceRepository.SourceAdd(sourceId, sourceType, name);
            }

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