Example #1
0
        public List <OpstiDomenskiObjekat> VratiSveObjekte(OpstiDomenskiObjekat odo)
        {
            try
            {
                string upit = "SELECT * FROM " + odo.VratiImeTabele();
                komanda = new OleDbCommand(upit, konekcija, transakcija);
                OleDbDataReader citac = komanda.ExecuteReader();

                return(odo.VratiListu(citac));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public OpstiDomenskiObjekat VratiObjekatPoUslovu(OpstiDomenskiObjekat odo)
        {
            try
            {
                string upit = "SELECT * FROM " + odo.VratiImeTabele() + " WHERE " + odo.VratiUslovZaObjekat();
                komanda = new OleDbCommand(upit, konekcija, transakcija);
                OleDbDataReader citac = komanda.ExecuteReader();

                return(odo.VratiObjekat(citac));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }