예제 #1
0
 public TehnickoLiceView(TehnickoLice t)
 {
     TehnicarId = t.TehnicarId;
     Ime        = t.Ime;
     Prezime    = t.Prezime;
     KontaktBr  = t.KontaktBr;
 }
예제 #2
0
        public static void DodajTehnickoLice(TehnickoLiceView t)
        {
            try
            {
                ISession s = DataLayer.GetSession();


                var tehnicko = new TehnickoLice();

                tehnicko.Ime       = t.Ime;
                tehnicko.Prezime   = t.Prezime;
                tehnicko.KontaktBr = t.KontaktBr;



                s.Save(tehnicko);
                s.Flush();
                s.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
예제 #3
0
        private void button13_Click(object sender, EventArgs e)
        {
            try
            {
                ISession     s = DataLayer.GetSession();
                TehnickoLice t = s.Load <TehnickoLice>(3);

                MessageBox.Show((t.Ime).ToString());
                MessageBox.Show((t.Prezime).ToString());
                MessageBox.Show((t.KontaktBr).ToString());


                s.Close();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
                Console.WriteLine(exception);
                throw;
            }
        }