Ejemplo n.º 1
0
        private void ArtikalJedan_FormClosing(object sender, FormClosingEventArgs e)
        {
            String grupa = "";

            try {
                baza.OtvoriKonekciju();
                OleDbCommand cmd2 = new OleDbCommand();
                cmd2.Connection  = baza.Connection;
                cmd2.CommandText = "select id_grupa from artikal where id_artikla=" + nasArtikal.Id_artikla;
                OleDbDataReader reader2 = cmd2.ExecuteReader();

                while (reader2.Read())
                {
                    grupa = reader2["id_grupa"].ToString();
                }
            } catch (Exception ex)
            { MessageBox.Show("Greska je " + ex); }
            finally
            {
                baza.ZatvoriKonekciju();
            }

            FormaArtikli formica = new FormaArtikli(grupa);

            formica.Show();
        }
Ejemplo n.º 2
0
        void otvoriArtikle(object sender, EventArgs e)
        {
            String       k          = ((Button)sender).Name;
            FormaArtikli frmartikli = new FormaArtikli(k);// saljem u sledecu formu informaciju koju je

            this.Hide();
            frmartikli.Show();                            // grupu izabrao korisnik
        }