Map() static private méthode

static private Map ( Attachment source, AttachmentData destination ) : void
source Attachment
destination AttachmentData
Résultat void
Exemple #1
0
        private void Fetch(Hour hour, HourData hourData)
        {
            DataMapper.Map(hour, hourData);

            hourData.Project   = new ProjectData();
            hourData.ProjectId = hour.Story.ProjectId;
            DataMapper.Map(hour.Story.Project, hourData.Project);

            hourData.Sprint = new SprintData();
            if (hourData.SprintId != 0)
            {
                DataMapper.Map(hour.Story.Sprint, hourData.Sprint);
            }

            hourData.Story = new StoryData();
            DataMapper.Map(hour.Story, hourData.Story);

            hourData.User = new UserData();
            DataMapper.Map(hour.User, hourData.User);

            hourData.CreatedByUser = new UserData();
            DataMapper.Map(hour.CreatedByUser, hourData.CreatedByUser);

            hourData.ModifiedByUser = new UserData();
            DataMapper.Map(hour.ModifiedByUser, hourData.ModifiedByUser);
        }
        private void Fetch(Story story, StoryData storyData)
        {
            DataMapper.Map(story, storyData);

            storyData.AssignedToUser = new UserData();
            if (story.AssignedTo != 0)
            {
                DataMapper.Map(story.AssignedToUser, storyData.AssignedToUser);
            }

            storyData.Project = new ProjectData();
            DataMapper.Map(story.Project, storyData.Project);

            storyData.Sprint = new SprintData();
            if (story.SprintId != 0)
            {
                DataMapper.Map(story.Sprint, storyData.Sprint);
            }

            storyData.Status      = new StatusData();
            storyData.IsOpened    = story.Status.IsStarted;
            storyData.IsCompleted = story.Status.IsCompleted;
            DataMapper.Map(story.Status, storyData.Status);

            storyData.CreatedByUser = new UserData();
            DataMapper.Map(story.CreatedByUser, storyData.CreatedByUser);

            storyData.ModifiedByUser = new UserData();
            DataMapper.Map(story.ModifiedByUser, storyData.ModifiedByUser);
        }
        private void Fetch(FeedSourceMember feedSourceMember, FeedSourceMemberData feedSourceMemberData)
        {
            DataMapper.Map(feedSourceMember, feedSourceMemberData);

            feedSourceMemberData.CreatedByUser = new UserData();
            DataMapper.Map(feedSourceMember.CreatedByUser, feedSourceMemberData.CreatedByUser);
        }
        private void Fetch(Organization organization, OrganizationData organizationData)
        {
            DataMapper.Map(organization, organizationData);

            organizationData.CreatedByUser = new UserData();
            DataMapper.Map(organization.CreatedByUser, organizationData.CreatedByUser);

            organizationData.ModifiedByUser = new UserData();
            DataMapper.Map(organization.ModifiedByUser, organizationData.ModifiedByUser);
        }
Exemple #5
0
        private void Fetch(Project project, ProjectData projectData)
        {
            DataMapper.Map(project, projectData);

            projectData.CreatedByUser = new UserData();
            DataMapper.Map(project.CreatedByUser, projectData.CreatedByUser);

            projectData.ModifiedByUser = new UserData();
            DataMapper.Map(project.ModifiedByUser, projectData.ModifiedByUser);
        }
        private void Fetch(Week week, WeekData weekData)
        {
            DataMapper.Map(week, weekData);

            weekData.CreatedByUser = new UserData();
            DataMapper.Map(week.CreatedByUser, weekData.CreatedByUser);

            weekData.ModifiedByUser = new UserData();
            DataMapper.Map(week.ModifiedByUser, weekData.ModifiedByUser);
        }
Exemple #7
0
        private void Fetch(Attachment attachment, AttachmentData attachmentData)
        {
            DataMapper.Map(attachment, attachmentData);

            attachmentData.Source = new SourceData();
            DataMapper.Map(attachment.Source, attachmentData.Source);

            attachmentData.CreatedByUser = new UserData();
            DataMapper.Map(attachment.CreatedByUser, attachmentData.CreatedByUser);

            attachmentData.ModifiedByUser = new UserData();
            DataMapper.Map(attachment.ModifiedByUser, attachmentData.ModifiedByUser);
        }
        private void Fetch(Note note, NoteData noteData)
        {
            DataMapper.Map(note, noteData);

            noteData.Source = new SourceData();
            DataMapper.Map(note.Source, noteData.Source);

            noteData.CreatedByUser = new UserData();
            DataMapper.Map(note.CreatedByUser, noteData.CreatedByUser);

            noteData.ModifiedByUser = new UserData();
            DataMapper.Map(note.ModifiedByUser, noteData.ModifiedByUser);
        }
        private void Fetch(Status status, StatusData statusData)
        {
            DataMapper.Map(status, statusData);

            statusData.Project = new ProjectData();
            DataMapper.Map(status.Project, statusData.Project);

            statusData.CreatedByUser = new UserData();
            DataMapper.Map(status.CreatedByUser, statusData.CreatedByUser);

            statusData.ModifiedByUser = new UserData();
            DataMapper.Map(status.ModifiedByUser, statusData.ModifiedByUser);
        }
Exemple #10
0
        private void Fetch(Timeline timeline, TimelineData timelineData)
        {
            DataMapper.Map(timeline, timelineData);

            timelineData.Source = new SourceData();
            DataMapper.Map(timeline.Source, timelineData.Source);

            timelineData.CreatedByUser = new UserData();
            DataMapper.Map(timeline.CreatedByUser, timelineData.CreatedByUser);

            timelineData.ModifiedByUser = new UserData();
            DataMapper.Map(timeline.ModifiedByUser, timelineData.ModifiedByUser);
        }
Exemple #11
0
        private void Fetch(Sprint sprint, SprintData sprintData)
        {
            DataMapper.Map(sprint, sprintData);

            sprintData.Project = new ProjectData();
            DataMapper.Map(sprint.Project, sprintData.Project);

            sprintData.CreatedByUser = new UserData();
            DataMapper.Map(sprint.CreatedByUser, sprintData.CreatedByUser);

            sprintData.ModifiedByUser = new UserData();
            DataMapper.Map(sprint.ModifiedByUser, sprintData.ModifiedByUser);
        }
Exemple #12
0
        private void Fetch(ProjectUserMember projectUserMember, ProjectUserMemberData projectUserMemberData)
        {
            DataMapper.Map(projectUserMember, projectUserMemberData);

            projectUserMemberData.Project = new ProjectData();
            DataMapper.Map(projectUserMember.Project, projectUserMemberData.Project);

            projectUserMemberData.User = new UserData();
            DataMapper.Map(projectUserMember.User, projectUserMemberData.User);

            projectUserMemberData.CreatedByUser = new UserData();
            DataMapper.Map(projectUserMember.CreatedByUser, projectUserMemberData.CreatedByUser);

            projectUserMemberData.ModifiedByUser = new UserData();
            DataMapper.Map(projectUserMember.ModifiedByUser, projectUserMemberData.ModifiedByUser);
        }
Exemple #13
0
        private void Fetch(OrganizationUserMember organizationUserMember, OrganizationUserMemberData organizationUserMemberData)
        {
            DataMapper.Map(organizationUserMember, organizationUserMemberData);

            organizationUserMemberData.Organization = new OrganizationData();
            DataMapper.Map(organizationUserMember.Organization, organizationUserMemberData.Organization);

            organizationUserMemberData.User = new UserData();
            DataMapper.Map(organizationUserMember.User, organizationUserMemberData.User);

            organizationUserMemberData.CreatedByUser = new UserData();
            DataMapper.Map(organizationUserMember.CreatedByUser, organizationUserMemberData.CreatedByUser);

            organizationUserMemberData.ModifiedByUser = new UserData();
            DataMapper.Map(organizationUserMember.ModifiedByUser, organizationUserMemberData.ModifiedByUser);
        }
        public OrganizationData Insert(OrganizationData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var organization = new Organization();

                DataMapper.Map(data, organization);

                ctx.ObjectContext.AddToOrganizations(organization);

                ctx.ObjectContext.SaveChanges();

                data.OrganizationId = organization.OrganizationId;

                return(data);
            }
        }
        public UserData Insert(UserData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var user = new User();

                DataMapper.Map(data, user);

                ctx.ObjectContext.AddToUsers(user);

                ctx.ObjectContext.SaveChanges();

                data.UserId = user.UserId;

                return(data);
            }
        }
Exemple #16
0
        public SourceData Insert(SourceData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var source = new Source();

                DataMapper.Map(data, source);

                ctx.ObjectContext.AddToSources(source);

                ctx.ObjectContext.SaveChanges();

                data.SourceId = source.SourceId;

                return(data);
            }
        }
Exemple #17
0
        public TimelineData Insert(TimelineData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var timeline = new Timeline();

                DataMapper.Map(data, timeline);

                ctx.ObjectContext.AddToTimelines(timeline);

                ctx.ObjectContext.SaveChanges();

                data.TimelineId = timeline.TimelineId;

                return(data);
            }
        }
        public FeedSourceMemberData Insert(FeedSourceMemberData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var feedSourceMember = new FeedSourceMember();

                DataMapper.Map(data, feedSourceMember);

                ctx.ObjectContext.AddToFeedSourceMembers(feedSourceMember);

                ctx.ObjectContext.SaveChanges();

                data.FeedSourceMemberId = feedSourceMember.FeedSourceMemberId;

                return(data);
            }
        }
Exemple #19
0
        public HourData Insert(HourData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var hour = new Hour();

                DataMapper.Map(data, hour);

                ctx.ObjectContext.AddToHours(hour);

                ctx.ObjectContext.SaveChanges();

                data.HourId = hour.HourId;

                return(data);
            }
        }
        public StoryData Insert(StoryData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var story = new Story();

                DataMapper.Map(data, story);

                ctx.ObjectContext.AddToStories(story);

                ctx.ObjectContext.SaveChanges();

                data.StoryId = story.StoryId;

                return(data);
            }
        }
Exemple #21
0
        public SprintData Insert(SprintData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var sprint = new Sprint();

                DataMapper.Map(data, sprint);

                ctx.ObjectContext.AddToSprints(sprint);

                ctx.ObjectContext.SaveChanges();

                data.SprintId = sprint.SprintId;

                return(data);
            }
        }
Exemple #22
0
        public AttachmentData Insert(AttachmentData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var attachment = new Attachment();

                DataMapper.Map(data, attachment);

                ctx.ObjectContext.AddToAttachments(attachment);

                ctx.ObjectContext.SaveChanges();

                data.AttachmentId = attachment.AttachmentId;

                return(data);
            }
        }
        public WeekData Insert(WeekData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var week = new Week();

                DataMapper.Map(data, week);

                ctx.ObjectContext.AddToWeeks(week);

                ctx.ObjectContext.SaveChanges();

                data.WeekId = week.WeekId;

                return(data);
            }
        }
        public NoteData Insert(NoteData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var note = new Note();

                DataMapper.Map(data, note);

                ctx.ObjectContext.AddToNotes(note);

                ctx.ObjectContext.SaveChanges();

                data.NoteId = note.NoteId;

                return(data);
            }
        }
Exemple #25
0
        public ProjectData Insert(ProjectData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var project = new Project();

                DataMapper.Map(data, project);

                ctx.ObjectContext.AddToProjects(project);

                ctx.ObjectContext.SaveChanges();

                data.ProjectId = project.ProjectId;

                return(data);
            }
        }
Exemple #26
0
        public TimelineData Update(TimelineData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var timeline =
                    new Timeline
                {
                    TimelineId = data.TimelineId
                };

                ctx.ObjectContext.Timelines.Attach(timeline);

                DataMapper.Map(data, timeline);

                ctx.ObjectContext.SaveChanges();

                return(data);
            }
        }
Exemple #27
0
        public ProjectData Update(ProjectData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var project =
                    new Project
                {
                    ProjectId = data.ProjectId
                };

                ctx.ObjectContext.Projects.Attach(project);

                DataMapper.Map(data, project);

                ctx.ObjectContext.SaveChanges();

                return(data);
            }
        }
Exemple #28
0
        public HourData Update(HourData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var hour =
                    new Hour
                {
                    HourId = data.HourId
                };

                ctx.ObjectContext.Hours.Attach(hour);

                DataMapper.Map(data, hour);

                ctx.ObjectContext.SaveChanges();

                return(data);
            }
        }
        public OrganizationData Update(OrganizationData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var organization =
                    new Organization
                {
                    OrganizationId = data.OrganizationId
                };

                ctx.ObjectContext.Organizations.Attach(organization);

                DataMapper.Map(data, organization);

                ctx.ObjectContext.SaveChanges();

                return(data);
            }
        }
        public WeekData Update(WeekData data)
        {
            using (var ctx = Csla.Data.ObjectContextManager <ApplicationEntities>
                             .GetManager(Database.ApplicationConnection, false))
            {
                var week =
                    new Week
                {
                    WeekId = data.WeekId
                };

                ctx.ObjectContext.Weeks.Attach(week);

                DataMapper.Map(data, week);

                ctx.ObjectContext.SaveChanges();

                return(data);
            }
        }