private KlinickiCentar SelectedKlinickiCentar(MetroGrid mg) { KlinickiCentar kc = null; if (mg.Rows.Count > 0) { kc = (KlinickiCentar)mg.SelectedRows[0].DataBoundItem; } return(kc); }
private void metroGridKlinickiCentri_CellContentClick(object sender, DataGridViewCellEventArgs e) { MetroGrid mg = sender as MetroGrid; if (mg.Rows.Count > 0) { KlinickiCentar kc = SelectedKlinickiCentar(metroGridKlinickiCentri); if (kc != null) { GetKlinikeData(kc); } } }
private void button12_Click(object sender, EventArgs e) { ISession s = DataLayerOracle.GetSession(); KlinickiCentar kc = s.Load <KlinickiCentar>(1); foreach (Klinika k in kc.Klinike) { foreach (SpecijalistaKC sckc in k.Specijaliste) { MessageBox.Show(sckc.Ime); } } s.Close(); }
private void RefreshUputData(Pacijent pacijent) { GetKlinickiCentriData(); KlinickiCentar kc = SelectedKlinickiCentar(metroGridKlinickiCentri); if (kc != null) { GetKlinikeData(kc); Klinika k = SelectedKlinika(metroGridKlinike); if (k != null) { GetSpecijalisteData(k); metroButtonZakaziKodSpecijaliste.Enabled = true; } else { metroButtonZakaziKodSpecijaliste.Enabled = false; } } }
private void GetKlinikeData(KlinickiCentar klinicki_centar) { //metroGridKlinike.Rows.Clear(); metroGridKlinike.DataSource = new BindingList <Klinika>(klinicki_centar.Klinike); }