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); } } }
private void createTask() { if (myBoard.createTask(TC.Title, TC.Text, TC.Due_date)) { MessageBox.Show("Task was created"); VM.ShowTheard(); this.Close(); } else { MessageBox.Show("Unable to create Task"); } }