Пример #1
0
        private void ucitajOruzje(int rowId)
        {
            Classes.Oruzje oruzje = new Classes.Oruzje();
            oruzje.asocirajPodatkeIzBaze(oruzjeGridView.Rows[rowId].Cells[0].Value.ToString());
            OruzjeInfo forma = new OruzjeInfo(oruzje);

            forma.ShowDialog();
        }
Пример #2
0
        public void asocirajPodatkeIzBazeVlasnika(string oibParam)
        {
            this.oruzje = new Classes.Oruzje();
            String           izvor = "URI=file:evidencija.db";
            SQLiteConnection conn  = new SQLiteConnection(izvor);

            conn.Open();
            SQLiteCommand naredba = conn.CreateCommand();

            naredba.CommandText = "SELECT * FROM VLASNIK_ORUZJA WHERE OIB='" + oibParam + "';";
            SQLiteDataReader reader = naredba.ExecuteReader();

            while (reader.Read())
            {
                this.oib                       = reader.GetString(0);
                this.jmbg                      = reader.GetString(1);
                this.ime                       = reader.GetString(2);
                this.prezime                   = reader.GetString(3);
                this.spol                      = pronadiSpol(reader.GetString(4));
                this.rod                       = pronadiRod(reader.GetString(5));
                this.drzavljanstvo             = reader.GetString(6);
                this.mjestoRodenja             = reader.GetString(7);
                this.drzavaRodenja             = reader.GetString(8);
                this.datumRodenja              = Convert.ToDateTime(reader.GetString(9));
                this.adresaPrebivalista        = reader.GetString(10);
                this.mjestoPrebivalista        = reader.GetString(11);
                this.postanskiBrojPrebivalista = Convert.ToString(reader.GetInt32(12));
                this.drzavaPrebivalista        = reader.GetString(13);
                this.adresaBoravista           = reader.GetString(14);
                this.mjestoBoravista           = reader.GetString(15);
                this.postanskiBrojBoravista    = Convert.ToString(reader.GetInt32(16));
                this.drzavaBoravista           = reader.GetString(17);
                this.oruzje.asocirajPodatkeIzBaze(reader.GetString(18));
                this.datumZahtjevaZaIzdavanjeDozvole = Convert.ToDateTime(reader.GetString(19));
                this.datumIstekaDozvole     = Convert.ToDateTime(reader.GetString(20));
                this.datumLijecnickog       = Convert.ToDateTime(reader.GetString(21));
                this.datumIstekaLijecnickog = Convert.ToDateTime(reader.GetString(22));
            }
            reader.Close();
            naredba.Dispose();
            conn.Close();
        }
Пример #3
0
 public OruzjeInfo(Classes.Oruzje oruzjeParam)
 {
     this.oruzje = oruzjeParam;
     InitializeComponent();
 }