예제 #1
0
 /// <summary>
 /// Dodaj baze do bazy
 /// </summary>
 /// <param name="inMemoryDatabase"></param>
 internal void addOrders(InMemoryDatabase inMemoryDatabase)
 {
     orders.AddRange(inMemoryDatabase.getOrders());
 }
예제 #2
0
        /// <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);
            }
        }