Exemplo n.º 1
0
        public ActionResult SaveCard(Card newCard)
        {
            newCard.CardHolderID = cardHolderID;

            Card.CreateCard(newCard, boardID);

            return RedirectToAction("PresentBoard", "Board", new { id = boardID });
        }
Exemplo n.º 2
0
        public ActionResult UpdateCard(Card card, int id)
        {
            card.CardID = id;
            card.CardHolderID = cardHolderID;

            if (!Card.UpdateCard(card))
                return View("Error");

            return RedirectToAction("PresentBoard", "Board", new { id = boardID });
        }
Exemplo n.º 3
0
        public ActionResult NewCard(int id)
        {
            CardHolder cardHolder = CardHolder.getCardHolderByID(id);

            if (cardHolder == null)
                return View("Error"); 

            boardID = cardHolder.BoardID;
            cardHolderID = id;
            Card card = new Card();
            return View("CreateCard", card);
        }
Exemplo n.º 4
0
Arquivo: Card.cs Projeto: asufia/0.3.0
        public static bool CreateCard(Card item, int boardID)
        {
            DAL.DataObjects.Card newCard = copyToDataObject(item);

            return BoardsManager.CreateCard(boardID, item.CardHolderID, newCard);
        }
Exemplo n.º 5
0
Arquivo: Card.cs Projeto: asufia/0.3.0
        public static Card copyFromDataObject(DAL.DataObjects.Card dataObjCard)
        {
            Card newCard = new Card();

            newCard.cardID = dataObjCard.CardId;
            newCard.cardHolderID = dataObjCard.CardHolderId;
            newCard.name = dataObjCard.Name;
            newCard.description = dataObjCard.Description;
            newCard.creationDate = dataObjCard.CreationDate;
            newCard.finalDate = dataObjCard.FinalDate;

            return newCard;

        }
Exemplo n.º 6
0
Arquivo: Card.cs Projeto: asufia/0.3.0
        public static DAL.DataObjects.Card copyToDataObject(Card domainLayerCard)
        {
            DAL.DataObjects.Card newCard = new DAL.DataObjects.Card();

            newCard.CardId = domainLayerCard.CardID;
            newCard.CardHolderId = domainLayerCard.CardHolderID;
            newCard.Name = domainLayerCard.Name;
            newCard.Description = domainLayerCard.Description;
            newCard.CreationDate = domainLayerCard.CreationDate;
            newCard.FinalDate = domainLayerCard.FinalDate;

            return newCard;
        }
Exemplo n.º 7
0
Arquivo: Card.cs Projeto: asufia/0.3.0
        public static bool UpdateCard(Card card)
        {
            DAL.DataObjects.Card item = copyToDataObject(card);

            return BoardsManager.UpdateCard(item);
        }