Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && maskedTextBox1.Text != "" && richTextBox1.Text != "")
     {
         if (textBox1.Text.Length == 11)
         {
             if (maskedTextBox1.Text.Length == 14)
             {
                 musteri musteri = new musteri();
                 musteri.tc      = textBox1.Text.ToString();
                 musteri.adsoyad = textBox2.Text.ToString();
                 musteri.tel     = maskedTextBox1.Text.ToString();
                 musteri.bolge   = textBox3.Text.ToString();
                 musteri.adres   = richTextBox1.Text.ToString();
                 musteri.musterikayit();
                 gridview();
             }
             else
             {
                 MessageBox.Show("Telefon numarasını eksik girdiniz");
             }
         }
         else
         {
             MessageBox.Show("Tc kimlik numarası 11 haneli olmalıdır");
         }
     }
     else
     {
         MessageBox.Show("Tüm alanları doldurun");
     }
 }
Ejemplo n.º 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "")
     {
         musteri musteri = new musteri();
         musteri.tc = textBox1.Text.ToString();
         musteri.musterisil();
         gridview();
     }
     else
     {
         MessageBox.Show("Tc kimlik numarasını boş bırakmayın");
     }
 }