private void ucitajMonitoringIzBaze(String idKlijent) { DBCommOsnovnePostavke.connection = new SqlConnection(DBBlokadeData.connectionString); DBCommOsnovnePostavke.connection.Open(); tblMonitorings = DBCommOsnovnePostavke.getMonitoring(idKlijent); DBCommOsnovnePostavke.connection.Close(); }
public void ucitajMonitoring() { lstMonitorings.Items.Clear(); if (klijenti != null && klijenti.Count >= 1) { DBCommOsnovnePostavke.connection = new SqlConnection(DBBlokadeData.connectionString); DBCommOsnovnePostavke.connection.Open(); tblMonitorings = DBCommOsnovnePostavke.getMonitoring(((Klijent)cmbKlijenti.SelectedItem).idKlijent); DBCommOsnovnePostavke.connection.Close(); foreach (tblMonitoring tblm in tblMonitorings) { lstMonitorings.Items.Add(tblm); } } }