Ejemplo n.º 1
0
        public Player(string name, IBoardManager boardManager)
        {
            this.Name = name;

            boardManager.CreateBoard(this);
            this.boardManager = boardManager;

            this.Events = new List <PlayerEvent>();
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("UserID, Name, DesiredPosition, Location, Skill, ResumeLink, CoverLetter")] Focus focus)
        {
            if (ModelState.IsValid)
            {
                await _focus.CreateFocus(focus);

                Board newBoard = new Board();
                newBoard.Name    = focus.Name;
                newBoard.FocusID = focus.ID;
                await _board.CreateBoard(newBoard);

                Column newDefaultColInterested = new Column();
                newDefaultColInterested.BoardID = newBoard.ID;
                newDefaultColInterested.Name    = "Interested";
                newDefaultColInterested.Order   = 1;

                Column newDefaultColWIP = new Column();
                newDefaultColWIP.BoardID = newBoard.ID;
                newDefaultColWIP.Name    = "Application";
                newDefaultColWIP.Order   = 2;

                Column newDefaultColComplete = new Column();
                newDefaultColComplete.BoardID = newBoard.ID;
                newDefaultColComplete.Name    = "Submitted";
                newDefaultColComplete.Order   = 3;

                Column newDefaultColInterview = new Column();
                newDefaultColInterview.BoardID = newBoard.ID;
                newDefaultColInterview.Name    = "Interview";
                newDefaultColInterview.Order   = 4;

                await _column.CreateColumn(newDefaultColInterested);

                await _column.CreateColumn(newDefaultColWIP);

                await _column.CreateColumn(newDefaultColComplete);

                await _column.CreateColumn(newDefaultColInterview);

                return(RedirectToAction(nameof(Index), focus));
            }
            return(RedirectToAction(nameof(Index), focus));
        }