Esempio n. 1
0
        public void Edit(Guid oldTableId, Board newTable)
        {
            var board = ModelDatabase.GetBoard(oldTableId);

            board.Name = newTable.Name;

            ModelDatabase.SaveChanges();
        }
Esempio n. 2
0
        public void Edit(BoardId oldBoardId, Board newBoard)
        {
            var board = ModelDatabase.GetBoard(oldBoardId);

            board.Name = newBoard.Name;

            ModelDatabase.SaveChanges();
        }
Esempio n. 3
0
        public void Add(Column table)
        {
            ModelDatabase.Columns.Add(new ColumnEntity {
                ColumnId = Guid.NewGuid(),
                Header   = table.Header,
                Brush    = table.Brush,
                BoardId  = ModelDatabase.GetBoard(table.BoardId).BoardId
            });

            ModelDatabase.SaveChanges();
        }
        public void Add(Column column)
        {
            AddSpaceForColumnIndex(column.Index);

            ModelDatabase.Columns.Add(new ColumnEntity {
                Id      = Guid.NewGuid(),
                Index   = column.Index,
                Header  = column.Header,
                Brush   = column.Brush,
                BoardId = ModelDatabase.GetBoard(column.BoardId).Id
            });

            ModelDatabase.SaveChanges();
        }
Esempio n. 5
0
        public void Add(Task table)
        {
            ModelDatabase.Tasks.Add(new TaskEntity {
                TaskId         = Guid.NewGuid(),
                Header         = table.Header,
                Description    = table.Description,
                Branch         = string.IsNullOrEmpty(table.Branch) ? "-" : table.Branch,
                State          = table.State,
                Priority       = table.Priority,
                CreateDateTime = DateTime.Now,
                DeveloperId    = ModelDatabase.GetUser(table.DeveloperId)?.UserId,
                ReviewerId     = ModelDatabase.GetUser(table.ReviewerId)?.UserId,
                ColumnId       = ModelDatabase.GetColumn(table.ColumnId)?.ColumnId,
                BoardId        = ModelDatabase.GetBoard(table.BoardId).BoardId
            });

            ModelDatabase.SaveChanges();
        }
Esempio n. 6
0
        public void Add(Task task)
        {
            AddSpaceForTaskIndex(task.Index);

            ModelDatabase.Tasks.Add(new TaskEntity {
                Id             = Guid.NewGuid(),
                Index          = task.Index,
                Header         = task.Header,
                Description    = task.Description,
                Branch         = string.IsNullOrEmpty(task.Branch) ? "-" : task.Branch,
                State          = task.State,
                Priority       = task.Priority,
                CreateDateTime = DateTime.Now,
                DeveloperId    = ModelDatabase.GetUser(task.DeveloperId)?.Id,
                ReviewerId     = ModelDatabase.GetUser(task.ReviewerId)?.Id,
                ColumnId       = ModelDatabase.GetColumn(task.ColumnId)?.Id,
                BoardId        = ModelDatabase.GetBoard(task.BoardId).Id
            });

            ModelDatabase.SaveChanges();
        }
Esempio n. 7
0
 public Board GetById(Guid id)
 {
     return(ModelDatabase.GetBoard(id).ToTable());
 }