public override void UpdateView(bool customerUpdated) { //Customer if (customerUpdated) { view.ClearCustomers(); foreach (Customer c in list_customers) { view.AddCustomer(c); } } //NetworkInventory (if customer has one) view.ClearNetworks(); if (currentNetworkInventory != null) { foreach (Network n in currentNetworkInventory.List_networks) { view.AddNetwork(n); } } //LicenseInventory (if customer has one) view.ClearLicenses(); if (currentLicenseInventory != null) { //Get for each License in the Inventory the Licensename and add a row to the data grid view foreach (Tuple <int, int> t in currentLicenseInventory.Inventory) { int licensenumber = t.Item1; int count = t.Item2; foreach (License l in list_allAvailableLicenses) { if (l.LicenseNumber == licensenumber) { view.AddLicense(l.Name, count); } } } } //Actions view.ClearActions(); if (currentSystemInventory != null) { view.AddAction(string.Format("Inventarisierung {0}", currentSystemInventory.Date)); } if (currentAudit != null) { view.AddAction(string.Format("Audit {0}", currentAudit.Date)); } }