Пример #1
0
 private void RemoveBoard(Board board)
 {
     confirmDelete.Raise(new Confirmation()
     {
         Content = "Are you sure you want to remove this record?",
         Title = "Confirm remove",
     }, confirmation =>
     {
         if (confirmation.Confirmed)
         {
             kanbanBoardDomainContext.Boards.Remove(board);
             kanbanBoardDomainContext.SubmitChanges();
             NotifyPropertyChanged("BoardsList");
         }
     });
 }
Пример #2
0
        private void EditBoard(Board board)
        {
            var dialog = this.container.Resolve<BoardChildWindow>();

            dialog.Title = "Edit board"; // Don't forget about title!
            dialog.BoardName = board.BoardName;
            dialog.Closed += (s, e) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {
                    string tmpBoardName = board.BoardName;
                    board.BoardName = dialog.BoardName;

                    if (HasValidationErrors(board))
                    {
                        board.BoardName = tmpBoardName;
                        dialog.Show();
                        return;
                    }

                    kanbanBoardDomainContext.SubmitChanges();
                    NotifyPropertyChanged("BoardsList");
                }
            };
            dialog.Show();
        }
Пример #3
0
 private void ManageBoard(Board board)
 {
     this.eventAggregator.GetEvent<BoardSelectedEvent>().Publish(board);
 }
Пример #4
0
        private void AddBoard()
        {
            var dialog = this.container.Resolve<BoardChildWindow>();

            dialog.Title = "Add new board"; // Don't forget about title!
            dialog.Closed += (s, e) =>
            {
                if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                {
                    // ToDo : Add implementation when board title isn't empty.
                    // Board name get from dialog.BoardName property!
                    Board board = new Board() { BoardName = dialog.BoardName, UserName = WebContextBase.Current.Authentication.User.Identity.Name, Id = Guid.NewGuid() };

                    //BoardColumn bc = new BoardColumn() { Board = board, Name = "bc", Position = 0, Id=Guid.NewGuid() };
                    //Task tk = new Task() { BoardColumn = bc, Description = "Descr", Name = "nm", Position = 0, Id = Guid.NewGuid() };
                    //bc.Tasks.Add(tk);
                    //board.BoardColumns.Add(bc);

                    if (HasValidationErrors(board))
                    {
                        dialog.Show();
                        return;
                    }

                    kanbanBoardDomainContext.Boards.Add(board);
                    kanbanBoardDomainContext.SubmitChanges();
                }
            };
            dialog.Show();
        }
Пример #5
0
 public void OnBoardSelectedForManaging(Board board)
 {
     viewOrchestrator.ChangeView(RegionNames.MAIN_REGION, ViewNames.SelectedBoardView,
         string.Format(viewOrchestrator.ParametrTemplate, BoardViewModel.BoardIdParam, board.Id),
         string.Format(viewOrchestrator.ParametrTemplate, BoardViewModel.BoardNameParam, board.BoardName));
 }
 /// <summary>
 /// Create a new Board object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="userName">Initial value of the UserName property.</param>
 /// <param name="boardName">Initial value of the BoardName property.</param>
 public static Board CreateBoard(global::System.Guid id, global::System.String userName, global::System.String boardName)
 {
     Board board = new Board();
     board.Id = id;
     board.UserName = userName;
     board.BoardName = boardName;
     return board;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Boards EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToBoards(Board board)
 {
     base.AddObject("Boards", board);
 }
Пример #8
0
 private bool FilterBoard(Board entity)
 {
     return (entity.Id == this.BoardId);
 }