private void btnVratiSeSaBrisanjaAuta_Click(object sender, EventArgs e) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); }
private void button2_Click(object sender, EventArgs e) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); }
private void btnVratiSeIzIzmenePonude_Click(object sender, EventArgs e) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); }
private void btnVratiSeSaRezervacije_Click(object sender, EventArgs e) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); }
private void btnVratiSeIzNovogAdmina_Click(object sender, EventArgs e) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); }
private void btnIzIzmeneUKonzolu_Click(object sender, EventArgs e) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); }
private void btnAdmin_Click(object sender, EventArgs e) { string s = txtUsername.Text; string p = txtPassword.Text; if (s != "" && p != "" && s.Length > 3 && p.Length > 7) { foreach (char c in s) { if (char.IsLetterOrDigit(c)) { userFail = false;; } else { userFail = true; break; } } if (userFail == false) { BinaryFormatter bf = new BinaryFormatter(); FileStream fs = new FileStream(putanjaAdmina, FileMode.Open, FileAccess.Read); listaAdmina = bf.Deserialize(fs) as List <Administrator>; fs.Close(); for (int i = 0; i < listaAdmina.Count; i++) { if (listaAdmina[i].Username.ToLower().Equals(txtUsername.Text.ToLower())) { if (listaAdmina[i].Sifra.ToLower().Equals(txtPassword.Text.ToLower())) { FormAdmin fAdmin = new FormAdmin(); fAdmin.Show(); this.Hide(); } } } } else { MessageBox.Show("Niste uneli dobro username/password,molimo pokusajte ponovo"); txtUsername.Text = ""; txtPassword.Text = ""; txtUsername.Focus(); } } else { MessageBox.Show("Niste uneli dobro username/password,molimo pokusajte ponovo"); txtUsername.Text = ""; txtPassword.Text = ""; txtUsername.Focus(); } }
private void button2_Click(object sender, EventArgs e) { if (txtUnesiMarku.Text != "" || txtUnesiModel.Text != "" || cmbOdaberiBrojVrata.Text != "" || cmbOdaberiGodiste.Text != "" || cmbOdaberiGorivo.Text != "" || cmbOdaberiKaroseriju.Text != "" || cmbOdaberiKubikazu.Text != "" || cmbOdaberiPogon.Text != "" || cmbOdaberiMenjac.Text != "") { if (MessageBox.Show("Da li ste sigurni da zelite da izadjete", "Upozorenje", MessageBoxButtons.YesNo) == DialogResult.Yes) { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); } else { // Jos uvek nista } } else { FormAdmin fadmin = new FormAdmin(); fadmin.Show(); this.Close(); } }