SHARE
TWEET

ShowAllTeamBoards

a guest Feb 18th, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using ManagementSystem.Core;
  2. using ManagementSystem.Core.Contracts;
  3. using ManagementSystem.Core.Providers;
  4. using ManagementSystem.Models.Contracts;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9.  
  10. namespace ManagementSystem.Commands.TeamCommands
  11. {
  12.     class ShowAllTeamBoards : Command
  13.     {
  14.         public ShowAllTeamBoards(IEngine engine) : base(engine)
  15.         {
  16.         }
  17.  
  18.         public override string Execute()
  19.         {
  20.             List<string> parameters = new List<string>();
  21.             string name = parameters[0];
  22.  
  23.             ITeam team = Engine.Database.TeamList.Where(t => t.Name == name).FirstOrDefault();
  24.             if (team.Boards != null)
  25.             {
  26.                 StringBuilder str = new StringBuilder();
  27.  
  28.                 str.AppendLine("----- Boards -----");
  29.                 foreach (var item in team.Boards)
  30.                 {
  31.                     str.AppendLine(item.ToString());
  32.                 }
  33.                 return str.ToString();
  34.             }
  35.             else
  36.             {
  37.                 return PrintMessages.NOboardsInTeam;
  38.             }
  39.         }
  40.     }
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top