Beispiel #1
0
        public void TestAddGrid()
        {
            Client client = new Client(USERNAME_OK, PASSWORD_OK, NAME_OK, SURNAME_OK, ID_OK, PHONE_OK, ADDRESS_OK, DATE_OK, null);

            CLIENT_HANDLER.Add(client);
            Grid anotherGrid = new Grid(GRID_NAME_OK, client, HEIGHT, WIDTH);

            GRID_HANDLER.Add(anotherGrid);
            Assert.IsTrue(dataStorage.Grids.Contains(anotherGrid));
        }
 private void createGrid(object sender, EventArgs e)
 {
     try
     {
         Grid newGrid = fetchValues();
         gridHandler.Add(newGrid, (Client)this.clientList.SelectedItem);
         Redirect(newGrid);
     }
     catch (ExceptionController Exception)
     {
         string message = Exception.Message;
         MessageBox.Show(message, "Oops", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }