Ejemplo n.º 1
0
        private void testing()
        {
            int con = 0;

            if (con == 1)// testing thruogh interface layer
            {
                ui.Login(VM.UserName, VM.PWD);
                BoardInter bi = ui.getMyBoard();
                bi.createTask("title1", "text", DateTime.Parse("12/3/2018"));//creates tasks for the current user
                Guid taskid = bi.getBoard().columns[0].tasks[0].taskid;
                bi.moveTask(taskid, "Backlog");
                bi.moveTask(taskid, "In Progress");
                bi.createTask("title2", "text", DateTime.Parse("12/3/2018"));
                taskid = bi.getBoard().columns[0].tasks[0].taskid;
                bi.moveTask(taskid, "Backlog");
                bi.createTask("title3", "text", DateTime.Parse("12/3/2018"));
            }
            else if (con == 2)// testing business layer
            {
                /*
                 * Board board = App.um.login(VM.UserName, VM.PWD).getBoardAt(0);
                 * MessageBox.Show("add Backlog= " + board.addColumn("Backlog").ToString());
                 * MessageBox.Show("rename inprogress= " + board.renameColumn("InProgress", "In Progress").ToString());
                 * MessageBox.Show("swap Backlog& In progress= " + board.swapColumns("BackLog", "In Progress"));
                 * MessageBox.Show("add sharonnnn= " + board.addColumn("sharonnnn"));
                 * MessageBox.Show("add gilz= " + board.addColumn("gilz"));
                 * MessageBox.Show("remove gilz= " + board.removeColumn("gilz"));
                 */
            }
            else if (con == 3)//test Data Access layer
            {
                BoardHandler     boardHandler = new BoardHandler();
                List <NumbBoard> nboards      = boardHandler.ReadBoards();

                UserHandler     userHandler = new UserHandler();
                List <NumbUser> nusers      = userHandler.readUsers();
                foreach (NumbUser nuser in nusers)
                {
                    MessageBox.Show("user = "******" , password = " + nuser.password);
                }
            }
        }
Ejemplo n.º 2
0
        public void ShowTheard()
        {
            ObservableCollection <BoardWindowColumn> taskRows = new ObservableCollection <BoardWindowColumn>();

            foreach (ModelColumn c in board.getBoard().columns)
            {
                foreach (ModelTask m in c.tasks)
                {
                    taskRows.Add(new BoardWindowColumn(m, c.limit));
                }
                if (c.tasks.Count == 0)
                {
                    taskRows.Add(new BoardWindowColumn(c.name, c.limit));
                }
            }
            Tasks = taskRows;
        }