Esempio n. 1
0
        public DataTransfer.Models.TaskSet Update(DataTransfer.Events.TaskSet item)
        {
            var mappedItem = new DataTransfer.Models.TaskSet
            {
                Id    = item.Id,
                Tasks = item.Tasks
            };

            return(dataCollector.Update(mappedItem));
        }
Esempio n. 2
0
        public DataTransfer.Models.TaskGraph Update(DataTransfer.Events.TaskGraph item)
        {
            var mappedItem = new DataTransfer.Models.TaskGraph
            {
                Id          = item.Id,
                Description = item.Description,
                Name        = item.Name,
                RootId      = item.RootId
            };

            return(dataCollector.Update(mappedItem));
        }
Esempio n. 3
0
        public DataTransfer.Models.Workspace Update(DataTransfer.Events.Workspace item)
        {
            var mappedItem = new DataTransfer.Models.Workspace
            {
                Description  = item.Description,
                Name         = item.Name,
                Id           = item.Id,
                TaskGraphIds = item.TaskGraphIds.ToList(),
                UserId       = item.UserId
            };

            return(dataCollector.Update(mappedItem));
        }
        public DataTransfer.Models.TaskGraph Update(DataTransfer.Events.TaskGraph item)
        {
            var current = dataProvider.Get(item.Id);

            current.Name        = item.Name;
            current.RootId      = item.RootId;
            current.Description = item.Description;

            var mappedItem = new DataLayer.Models.TaskGraph
            {
                Id          = item.Id,
                Description = item.Description,
                Name        = item.Name,
                RootId      = item.RootId,
            };

            return(Mappers[Tuple.Create(Layer.Data, Layer.DataTransfer)].Map <DataLayer.Models.TaskGraph, TaskGraph>(dataCollector.Update(current)));
        }
        public WorkspaceTransferModel Update(WorkspaceTransferModel item)
        {
            //var mappedItem = new DataTransfer.Models.Workspace
            //{
            //    Description = item.Description,
            //    Name = item.Name,
            //    Id = item.Id,
            //    TaskGraphIds = item.TaskGraphIds.ToList(),
            //    UserId = item.UserId
            //};

            var mappedItem = Mappers[Tuple.Create(Layer.Data, Layer.DataTransfer)].Map <WorkspaceTransferModel, WorkspaceDataModel>(item);

            return(Mappers[Tuple.Create(Layer.Data, Layer.DataTransfer)].Map <WorkspaceDataModel, WorkspaceTransferModel>(dataCollector.Update(mappedItem)));
        }