Ejemplo n.º 1
0
        private void ObrisiStaratelja_Click(object sender, EventArgs e)
        {
            ISession s = DataLayer.GetSession();

            Skola.Entiteti.Staratelj u = s.Load <Skola.Entiteti.Staratelj>(23);
            s.Delete(u);
            MessageBox.Show("Staratelj uspesno obrisan.");

            s.Flush();
            s.Close();
        }
Ejemplo n.º 2
0
        private void VratiStaratelja_Click(object sender, EventArgs e)
        {
            Skola.Entiteti.Staratelj rod = new Skola.Entiteti.Staratelj();

            ISession s = DataLayer.GetSession();

            rod = s.Load <Skola.Entiteti.Staratelj>(5);
            s.Flush();

            MessageBox.Show(rod.Ime + " " + rod.Prezime);
            s.Close();
        }
Ejemplo n.º 3
0
        private void KreirajStaratelja_Click(object sender, EventArgs e)
        {
            ISession s = DataLayer.GetSession();

            Skola.Entiteti.Staratelj r = new Skola.Entiteti.Staratelj();
            r.Ime        = "Nenad";
            r.Prezime    = "Petrovic";
            r.ClanSaveta = 0;

            s.Save(r);
            MessageBox.Show("Staratelj uspesno kreiran.");
            s.Flush();
            s.Close();
        }
Ejemplo n.º 4
0
        private void AzurirajStaratelja_Click(object sender, EventArgs e)
        {
            ISession s = DataLayer.GetSession();

            Skola.Entiteti.Staratelj r = s.Load <Skola.Entiteti.Staratelj>(7);
            r.Ime        = "Rajko";
            r.Prezime    = "Trajkovic";
            r.ClanSaveta = 0;


            s.SaveOrUpdate(r);
            MessageBox.Show("Staratelj uspesno azuriran.");
            s.Flush();
            s.Close();
        }
Ejemplo n.º 5
0
 public Telefoni()
 {
     Staratelj_Id = new Staratelj();
 }