private void btnCreateAkt_Click(object sender, EventArgs e) { try { ISession session = DataLayer.GetSession(); AktVlade avl = new AktVlade() { TipAkta = "odluka" }; AktViseOd1500Biraca abir = new AktViseOd1500Biraca() { TipAkta = "tumacenje", BrojBiraca = 20000 }; AktNarodnihPoslanika anp = new AktNarodnihPoslanika() { TipAkta = "zakon" }; session.Save(anp); session.Save(avl); session.Save(abir); session.Flush(); session.Close(); } catch (Exception exception) { this.ShowExceptionData(exception); } }
private void btnReadAkt_Click(object sender, EventArgs e) { try { ISession session = DataLayer.GetSession(); AktVlade akt = session.Load <AktVlade>(32); MessageBox.Show(akt.Id + ", " + akt.TipAkta); session.Close(); } catch (Exception exception) { this.ShowExceptionData(exception); } }
public AktVladeView(AktVlade aktVlade) : base(aktVlade) { }