Exemple #1
0
        private void uredu_Click(object sender, EventArgs e)
        {
            string korisnik = korisnickoIme.Text;
            string sifra    = lozinka.Text;

            try
            {
                // Provjeriti podatke! Fino ovo poslije srediti.
                DAO dao = new DAO("localhost", "ikzavrsni", "root", "root");


                if (dao.ProvjeriPristup(korisnik, sifra))
                {
                    Izbornik meni = new Izbornik(korisnik);
                    meni.Show();
                    //this.Hide();
                }
                else
                {
                    statusStrip1.BackColor     = Color.White;
                    toolStripStatusLabel1.Text = "Greška.";
                }
            }
            catch (Exception)
            {
                statusStrip1.BackColor     = Color.White;
                toolStripStatusLabel1.Text = "Greška.";
            }
        }
Exemple #2
0
        private void uredu_Click(object sender, EventArgs e)
        {
            string korisnik = korisnickoIme.Text;
            string sifra = lozinka.Text;

            try
            {
                // Provjeriti podatke! Fino ovo poslije srediti.
                DAO dao = new DAO("localhost", "ikzavrsni", "root", "root");

                if (dao.ProvjeriPristup(korisnik, sifra))
                {
                    Izbornik meni = new Izbornik(korisnik);
                    meni.Show();
                    //this.Hide();
                }
                else
                {
                    statusStrip1.BackColor = Color.White;
                    toolStripStatusLabel1.Text = "Greška.";
                }

            }
            catch (Exception)
            {
                statusStrip1.BackColor = Color.White;
                toolStripStatusLabel1.Text = "Greška.";
            }
        }