/// <summary> /// Dodaj baze do bazy /// </summary> /// <param name="inMemoryDatabase"></param> internal void addOrders(InMemoryDatabase inMemoryDatabase) { orders.AddRange(inMemoryDatabase.getOrders()); }
/// <summary> /// Funkcja odświeża dane zawarte w datagridView1, który wyświetla zawartość całej bazy. /// </summary> private void refreshData() { database.check(); List <request> listOfOrders = database.getOrders(); if (listOfOrders.Count != 0) { comboBox1.Enabled = true; } dataGridView1.Rows.Clear(); foreach (request it in listOfOrders) { DataGridViewRow row = (DataGridViewRow)dataGridView1.RowTemplate.Clone(); row.CreateCells(dataGridView1, it.getClientId(), it.getRequestId(), it.getName(), it.getQuantity(), it.getPrice()); dataGridView1.Rows.Add(row); } }