private void notification_add_Load(object sender, EventArgs e) { LinkedList <server> serverList = new LinkedList <server>(); serverList = dataOperator.getAllServers(); foreach (server s in serverList) { cbServers.Items.Add(s.getName() + " " + s.getMAC()); } }
private void showAllServers() { dgServers.Rows.Clear(); LinkedList <server> serversList = new LinkedList <server>(); serversList = dataOperator.getAllServers(); if (serversList != null) { foreach (server s in serversList) { dgServers.Rows.Add(s.getMAC(), s.getName(), s.getDescription()); } } else { Form1.showErrorMessage("No server found in database"); } }