private void button1_Click(object sender, EventArgs e)
 {
     DAL.DAL d = DAL.DAL.Instanca;
     d.kreirajKonekciju("localhost", "kladionica", "root", "");
     DAL.DAL.ClanDAO cd = new DAL.DAL.ClanDAO();
     Clan trazeni_clan = cd.getById(Convert.ToInt32(textBox1.Text));
     d.terminirajKonekciju();
     l_ime.Text = trazeni_clan.ImePrezime;
     l_jmbg.Text = trazeni_clan.Jmbg;
     pictureBox1.ImageLocation = trazeni_clan.Picpath;
     groupBox1.Visible = true;
 }
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Encrypt enc = new Encrypt();
         DAL.DAL d = DAL.DAL.Instanca;
         d.kreirajKonekciju("localhost", "kladionica", "root", "");
         DAL.DAL.ClanDAO ud = new DAL.DAL.ClanDAO();
         Clan c = ud.getById(Convert.ToInt32(textBox1.Text));
         d.terminirajKonekciju();
         t_ime.Text = enc.DecryptString(c.ImePrezime);
         t_jmbg.Text = c.Jmbg;
         pictureBox1.ImageLocation = c.Picpath;
         groupBox1.Visible = true;
     }
     catch (Exception r)
     {
         MessageBox.Show(r.Message);
     }
 }