示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && maskedTextBox1.Text != "" && richTextBox1.Text != "")
     {
         string tcNo = textBox1.Text.ToString();
         int    toplam = 0; int toplam2 = 0; int toplam3 = 0;
         if (tcNo.Length == 11)
         {
             if (Convert.ToInt32(tcNo[0].ToString()) != 0)
             {
                 for (int i = 0; i < 10; i++)
                 {
                     toplam = toplam + Convert.ToInt32(tcNo[i].ToString());
                     if (i % 2 == 0)
                     {
                         if (i != 10)
                         {
                             toplam2 = toplam2 + Convert.ToInt32(tcNo[i].ToString());
                         }
                     }
                     else
                     {
                         if (i != 9)
                         {
                             toplam3 = toplam3 + Convert.ToInt32(tcNo[i].ToString());
                         }
                     }
                 }
                 if (((toplam2 * 7) - toplam3) % 10 == Convert.ToInt32(tcNo[9].ToString()) && toplam % 10 == Convert.ToInt32(tcNo[10].ToString()))
                 {
                     kullanici kullanıcı = new kullanici();
                     kullanıcı.tc    = textBox1.Text.ToString();
                     kullanıcı.ad    = textBox2.Text.ToString();
                     kullanıcı.sifre = textBox3.Text.ToString();
                     kullanıcı.telno = maskedTextBox1.Text.ToString();
                     kullanıcı.adres = richTextBox1.Text.ToString();
                     kullanıcı.sehir = textBox4.Text.ToString();
                     kullanıcı.ykayit();
                     doldur();
                 }
                 else
                 {
                     MessageBox.Show("Tc Kimlik Numarası Yanlıştır!!");
                 }
             }
             else
             {
                 MessageBox.Show("TC Kimlik Numarası 0 ile başlayamaz!");
             }
         }
         else
         {
             MessageBox.Show("Tc Kimlik Numarınız 11 haneli olmak zorunda eksik değer girdiniz!");
         }
     }
     else
     {
         MessageBox.Show("Lütfen Tüm Alanları Doldurunuz!!!");
     }
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            kullanici kullanici = new kullanici();

            kullanici.ad    = textBox1.Text.ToString();
            kullanici.sifre = textBox2.Text.ToString();
            kullanici.yetkiligiris();
        }
示例#3
0
        public void button1_Click(object sender, EventArgs e)
        {
            kullanici kullanici = new kullanici();

            kullanici.ad    = textBox1.Text.ToString();
            kullanici.sifre = textBox2.Text.ToString();
            kullanici.personelgiris();
        }
示例#4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.ToString() != "")
     {
         kullanici kullanıcı = new kullanici();
         kullanıcı.tc = textBox1.Text.ToString();
         kullanıcı.personelsil();
         doldur();
     }
     else
     {
         MessageBox.Show("Lütfen Silmek İstediğiniz Personelin Tc No'sunu Giriniz!!.");
     }
 }
示例#5
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.ToString() != "")
     {
         kullanici kullanıcı = new kullanici();
         kullanıcı.tc = textBox1.Text.ToString();
         kullanıcı.yetkilisil();
         doldur();
     }
     else
     {
         MessageBox.Show("Lütfen Silmek İstediğiniz Yetklini Tcsini Giriniz!");
     }
 }