Esempio n. 1
0
        public static OrganizatoriHomeBasic GetOrganizatoriHomeBasic(int odId)
        {
            OrganizatoriHomeBasic sb = new OrganizatoriHomeBasic();

            try
            {
                ISession s = DataLayer.GetSession();

                Organizator sh = s.Load <Organizator>(odId);
                sb = new OrganizatoriHomeBasic(sh.maticni_broj, sh.ime, sh.prezime, sh.adresa);
                s.Close();
            }

            catch
            {
            }
            return(sb);
        }
Esempio n. 2
0
        public static OrganizatoriHomeBasic UpdateOrganizatoriHomeBasic(OrganizatoriHomeBasic sb)
        {
            try
            {
                ISession    s  = DataLayer.GetSession();
                Organizator sh = s.Load <Organizator>(sb.maticni_broj);
                sh.ime     = sb.ime;
                sh.prezime = sb.prezime;
                sh.adresa  = sb.adresa;

                s.Update(sh);
                s.Flush();
                s.Close();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            return(sb);
        }