コード例 #1
0
 //
 // GET: /Cards/Create
 public ActionResult Create(string boardId, string listId)
 {
     ViewBag.Title = "Create";
     ViewBag.SubTitle = "A New Card";
     ViewBag.ButtonText = "Create";
     Card c = new Card { BoardName = boardId, ListName = listId, isArchived = false };
     return View("Form", c);
 }
コード例 #2
0
        public ActionResult Create(Card card)
        {
            try
            {
                card.Id = AppServices.GetNumberOfCardsInBoard(card.BoardName) + 1;
                AppServices.AddCard(card);

                return RedirectToAction("Details", "Boards");
            }
            catch
            {
                return View();
            }
        }
コード例 #3
0
 public static void EditCard(Card card)
 {
     _repoCard.Edit(card);
 }
コード例 #4
0
 public static void AddCard(Card card)
 {
     _repoCard.Add(card);
 }
コード例 #5
0
 public static void RemoveCard(Card card)
 {
     _repoCard.Remove(card);
 }
コード例 #6
0
        public ActionResult Edit(string boardId, string listId, string cardId, Card card)
        {
            try
            {
                card.BoardName = boardId;
                AppServices.EditCard(card);

                return RedirectToAction("Index", "Boards");
            }
            catch
            {
                return View();
            }
        }