Exemple #1
0
        public void MoveCard(Card cardtodelete)
        {
            // SWITCH:
            switch (cardtodelete.Column)
            {
            case "Estimate":
                foreach (var item in EstimateCards)
                {
                    if (item == cardtodelete)
                    {
                        item.Column = "Testing";
                        TestingCards.Add(item);
                        EstimateCards.Remove(item);
                        break;
                    }
                }
                break;

            case "Testing":
                foreach (var item in TestingCards)
                {
                    if (item == cardtodelete)
                    {
                        item.Column = "Deploy";
                        DeployCards.Add(item);
                        TestingCards.Remove(item);
                        break;
                    }
                }
                break;

            case "Deploy":
                foreach (var item in DeployCards)
                {
                    if (item == cardtodelete)
                    {
                        item.Column = "Finish";
                        DeployCards.Remove(item);
                        break;
                    }
                }
                break;

            default:
                foreach (var item in Cards)
                {
                    if (item == cardtodelete)
                    {
                        Cards.Remove(item);
                        break;
                    }
                }
                break;
            }
        }
Exemple #2
0
        public void DeleteCard(Card cardtodelete)
        {
            // SWITCH:
            switch (cardtodelete.Column)
            {
            case "Estimate":
                foreach (var item in EstimateCards)
                {
                    if (item == cardtodelete)
                    {
                        EstimateCards.Remove(item);
                        break;
                    }
                }
                break;

            case "Testing":
                foreach (var item in TestingCards)
                {
                    if (item == cardtodelete)
                    {
                        TestingCards.Remove(item);
                        break;
                    }
                }
                break;

            case "Deploy":
                foreach (var item in DeployCards)
                {
                    if (item == cardtodelete)
                    {
                        DeployCards.Remove(item);
                        break;
                    }
                }
                break;

            default:
                foreach (var item in Cards)
                {
                    if (item == cardtodelete)
                    {
                        Cards.Remove(item);
                        break;
                    }
                }
                break;
            }
        }