Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using BusinessLayer;
- using Provjera;
- namespace Rasadnik
- {
- public partial class FormLogin : Form
- {
- Zaposlenik zap = new Zaposlenik();
- public FormLogin()
- {
- InitializeComponent();
- }
- private void btnLogin_Click(object sender, EventArgs e)
- {
- Provjera.Provj ma = new Provjera.Provj();
- int prava, IDZaposlenik, IDRasadnik;
- bool us, pw;
- string user = tBxUsername.Text.ToString();
- string pass = tBxPassword.Text.ToString();
- us = ma.ProvjeraUsername(user);
- pw = ma.ProvjeraUsername(pass);
- if (us == true)
- {
- if (pw == true)
- {
- if (zap.LoginTrue(user, pass))
- {
- prava = zap.AdministratorTrue(user, pass);
- IDZaposlenik = zap.idZaposlenik(user,pass);
- IDRasadnik = zap.idRasadnik(user,pass);
- this.Hide();
- FormMain FM = new FormMain(prava,IDZaposlenik, IDRasadnik);
- FM.ShowDialog();
- this.Close();
- }
- }
- }
- else
- {
- MessageBox.Show("Korisničko ime ili lozinka nisu ispravni");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement