Exemplo n.º 1
0
        private void textBox1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (textBox1.Text == label4.Text)
                {
                    if (label3.Text == "Yönetici")
                    {
                        yonetici yn = new yonetici();
                        yn.Show();
                        this.Hide();
                    }

                    if (label3.Text == "Personel")
                    {
                        Form1 fr = new Form1();
                        fr.Show();
                        this.Hide();
                    }
                }
                else
                {
                    MessageBox.Show("Lütfen Girdiğiniz Verilerin Doğru Olduğuna Emin Olunuz..");
                }
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            yonetici yn = new yonetici();

            yn.Show();
            this.Hide();
        }
        private void button3_Click_1(object sender, EventArgs e)
        {
            yonetici yn = new yonetici();

            yn.Show();
            this.Close();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            string tc, ad, dgmyeri, dgmtrh, baba, durumu;

            ad      = textBox1.Text;
            dgmyeri = textBox4.Text;
            tc      = textBox2.Text;
            baba    = textBox3.Text;
            dgmtrh  = dateTimePicker1.Value.ToString();
            durumu  = "Aktif";


            if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "")
            {
                MessageBox.Show("Lütfen Tüm Alanların Dolu Olduğuna Emin Olunuz...");
            }
            if (textBox5.Text == "")
            {
                pictureBox1.ImageLocation = "imag.png";
            }
            else
            {
                string parola;
                parola = GenerateNewPassword(4);
                bag.Open();
                komut.Connection  = bag;
                komut.CommandText = "insert into personel (tckimlik,adsoyad,dogumtarihi,dogumyeri,babaadi,durumu,resim,mevki)values('" + tc + "','" + ad + "','" + dgmtrh + "','" + dgmyeri + "','" + baba + "','" + durumu + "','" + textBox5.Text + "','" + comboBox1.Text + "')";
                komut.ExecuteNonQuery();
                komut.CommandText = "insert into kullanici (adsoyad,sifre,mevki)values('" + textBox1.Text + "','" + parola + "','" + comboBox1.Text + "')";
                MessageBox.Show("Personel Şifresi : " + parola);
                komut.ExecuteNonQuery();

                MessageBox.Show("İşleminiz Kaydedildi..");
                bag.Close();
                textBox1.Clear();
                textBox2.Clear();
                textBox3.Clear();
                textBox4.Clear();
            }
            yonetici yn = new yonetici();

            yn.Show();
            this.Close();
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == label4.Text)
            {
                if (label3.Text == "Yönetici")
                {
                    yonetici yn = new yonetici();
                    yn.Show();
                    this.Hide();
                }

                if (label3.Text == "Personel")
                {
                    Form1 fr = new Form1();
                    fr.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("Lütfen Girdiğiniz Verilerin Doğru Olduğuna Emin Olunuz..");
            }
        }