示例#1
0
        public MoveForm(int X, int Y, int cardId)
        {
            InitializeComponent();
            this.Location      = new Point(X, Y);
            this.StartPosition = FormStartPosition.Manual;
            _cardId            = cardId;
            this.Height        = 280;

            cardDTO = cardBLL.GetCard(_cardId);
            listDTO = listBLL.GetList(cardDTO.ListId);
            // listDTOs = listBLL.GetAllList(listDTO.BoardId);
            listDTOs = listBLL.GetAllList(Global.id_Board);
            //cardDTOs = cardBLL.GetAllCard(cardDTO.ListId);
            boardBtn.LabelText = Global.id_Board.ToString();
            listBtn.LabelText  = listDTO.Title;
            // positionBtn.LabelText = cardDTO.IndexCard.ToString();
        }
 public LabelEdit(int X, int Y, int cardId)
 {
     InitializeComponent();
     this.Location      = new Point(X, Y);
     this.StartPosition = FormStartPosition.Manual;
     cardDTO            = cardBLL.GetCard(cardId);
     _boardId           = listBLL.GetList(cardDTO.ListId).BoardId;
 }
        private void ListComponent_MouseClick(object sender, MouseEventArgs e)
        {
            ActivityBLL activityBLL = new ActivityBLL();

            cardDTO.ListId = _id;
            cardBLL.UpdateCard(cardDTO);
            activityBLL.InsertActivity(Global.user.UserId, listBLL.GetList(cardDTO.ListId).BoardId, Global.user.Name + " Has move card to list: " + listBLL.GetList(cardDTO.ListId).Title, DateTime.Now);

            moveForm.Close();
        }
        public CardDetail(int id, ListSpace listSpace)
        {
            InitializeComponent();
            this.StartPosition = FormStartPosition.CenterScreen;
            _cardId            = id;
            _listSpace         = listSpace;
            cardDTO            = cardBLL.GetCard(_cardId);

            switch (cardDTO.Label)
            {
            case 1:
                this.cardLabel.BackColor = Color.Red;
                break;

            case 2:
                this.cardLabel.BackColor = Color.Yellow;
                break;

            case 3:
                this.cardLabel.BackColor = Color.Green;
                break;

            case 4:
                this.cardLabel.BackColor = Color.Orange;
                break;

            case 5:
                this.cardLabel.BackColor = Color.Blue;
                break;

            case 6:
                this.cardLabel.BackColor = Color.Fuchsia;
                break;

            default:
                this.cardLabel.BackColor = Color.Transparent;
                break;
            }
            this.CardName.Text        = cardDTO.Title;
            this.descriptionText.Text = cardDTO.Description;
            this.checkDueDate.Text    = cardDTO.DueDate.Date.ToString();

            AddMember();


            this.descriptionText.LostFocus += DescriptionText_LostFocus;
            this.commentText.LostFocus     += CommentText_LostFocus;

            listDTO        = listBLL.GetList(cardDTO.ListId);
            this.List.Text = listDTO.Title;
            //_boardId = listDTO.BoardId;

            commentDTOs = commentBLL.GetAllComments(_cardId);
            foreach (CommentDTO comment in commentDTOs)
            {
                UserComment userComment = new UserComment(userBLL.GetUser(comment.UserId).Name.Substring(0, 1), comment.Content);
                cmtPanel.Controls.Add(userComment);
            }

            activityPanel.Controls.Clear();
        }