private void button2_Click(object sender, EventArgs e)
 {
     Encrypt enc = new Encrypt();
     Clan c = new Clan(enc.EncryptString(t_ime.Text + " " + t_prezime.Text), t_jmbg.Text, slika);
     DAL.DAL d = DAL.DAL.Instanca;
     d.kreirajKonekciju("localhost", "kladionica", "root", "");
     DAL.DAL.ClanDAO cd = new DAL.DAL.ClanDAO();
     c.DajIDClana = cd.create(c);
     d.terminirajKonekciju();
     MessageBox.Show("Član uspješno dodan!");
     this.Close();
 }
 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);
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     Encrypt enc = new Encrypt();
     MessageBox.Show(enc.EncryptString(maskedTextBox1.Text));
     maskedTextBox1.Text = enc.EncryptString(maskedTextBox1.Text);
 }