Ejemplo n.º 1
0
        private void Ekle_Load(object sender, EventArgs e)
        {
            Giris x = new Giris();

            if (label21.Text == "ADMİN")
            {
                personelPanel.Enabled = true;
                panel1.Enabled        = true;
            }


            depoComboboxLoad();
            turComboboxLoad();
            yayinEviComboboxLoad();
            yazarComboboxLoad();
            kullaniciLoad();
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            baglanti.Open();
            MySqlCommand command  = new MySqlCommand();
            MySqlCommand command2 = new MySqlCommand();

            command.CommandText  = "select adminMi from kullanicilar where userId='" + id.Text + "' and pass='******'";
            command.Connection   = baglanti;
            command2.CommandText = "select personelAdiSoyadi from kullanicilar,personel where userId='" + id.Text + "' and pass='******' and kullanicilar.personelKodu=personel.telefon";
            command2.Connection  = baglanti;
            string sart = Convert.ToString(command.ExecuteScalar());
            Giris  x    = new Giris();

            x.label2.Text = Convert.ToString(command2.ExecuteScalar());
            if (sart == "True")
            {
                x.label1.Text = "ADMİN";
                x.Show();
                this.Hide();
            }
            else if (sart == "False")
            {
                x.label1.Text      = "KULLANICI";
                x.label1.ForeColor = Color.Blue;
                x.Show();
                this.Hide();
            }
            else
            {
                label3.Text = "Kullanıcı adı veya şifre yanlış..";
            }



            baglanti.Close();
        }