using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
namespace
WindowsFormsApplication10
{
public
partial
class
Form1 : Form
{
int
a=0;
int
sayac = 0;
int
i = 0;
public
string
[] adsoyad =
new
string
[100];
public
string
[] sınıf =
new
string
[100];
public
string
[] tckimlik =
new
string
[100];
public
string
[] memleket =
new
string
[100];
public
string
[] cinsiyet =
new
string
[100];
public
string
[]
doğumtarihi
=
new
string
[100];
public
Form1()
{
InitializeComponent();
}
private
void
button1_Click(
object
sender, EventArgs e)
{
adsoyad[i] = textBox1.Text;
sınıf[i] = comboBox1.SelectedItem.ToString();
tckimlik[i] = textBox3.Text;
memleket[i] = comboBox2.SelectedItem.ToString();
if
(checkBox1.Checked ==
true
) cinsiyet[i] = checkBox1.Text;
else
cinsiyet[i] = checkBox2.Text;
do
ğumtarihi[i] = dateTimePicker1.Text;
MessageBox.Show(
"Kaydınız Başarıyla Alındı"
);
i = i + 1;
sayac = sayac + 1;
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
comboBox1.Text =
"Sınıfı Seçiniz"
;
comboBox1.Items.Add(
"9/A"
);
comboBox1.Items.Add(
"9/B"
);
comboBox1.Items.Add(
"9/C"
);
comboBox1.Items.Add(
"9/D"
);
comboBox1.Items.Add(
"9/E"
);
comboBox1.Items.Add(
"10/A"
);
comboBox1.Items.Add(
"10/B"
);
comboBox1.Items.Add(
"10/C"
);
comboBox1.Items.Add(
"10/D"
);
comboBox1.Items.Add(
"11/A"
);
comboBox1.Items.Add(
"11/B"
);
comboBox1.Items.Add(
"11/L"
);
comboBox1.Items.Add(
"11/T"
);
comboBox2.Text =
"İli Seçiniz"
;
comboBox2.Items.Add(
"Adana"
);
comboBox2.Items.Add(
"Ankara"
);
comboBox2.Items.Add(
"Antalya"
);
comboBox2.Items.Add(
"Artvin"
);
comboBox2.Items.Add(
"Ağrı"
);
comboBox2.Items.Add(
"Adıyaman"
);
comboBox2.Items.Add(
"Ardahan"
);
comboBox2.Items.Add(
"Bilecik"
);
comboBox2.Items.Add(
"Samsun"
);
comboBox2.Items.Add(
"Bursa"
);
comboBox2.Items.Add(
"Tokat"
);
comboBox2.Items.Add(
"Edirne"
);
comboBox2.Items.Add(
"Denizli"
);
comboBox2.Items.Add(
"Muğla"
);
comboBox2.Items.Add(
"Kocaeli"
);
comboBox2.Items.Add(
"Çanakkale"
);
comboBox2.Items.Add(
"Kıklareli"
);
comboBox2.Items.Add(
"Bayburt"
);
comboBox2.Items.Add(
"Mersin"
);
comboBox2.Items.Add(
"Kütahya"
);
}
private
void
button2_Click(
object
sender, EventArgs e)
{
label7.Text =
"Ad Soyad :"
+ adsoyad[a];
label8.Text =
"Sınıf :"
+ sınıf[a];
label9.Text =
"T.C. Kimlik No :"
+ tckimlik[a];
label10.Text =
"Memleket :"
+ memleket[a];
label11.Text =
"Cinsiyet :"
+ cinsiyet[a];
label12.Text =
"Doğum Tarihi :"
+
do
ğumtarihi[a];
}
private
void
checkBox1_CheckedChanged(
object
sender, EventArgs e)
{
if
(checkBox1.Checked ==
true
) checkBox2.Enabled =
false
;
else
checkBox2.Enabled =
true
;
}
private
void
checkBox2_CheckedChanged(
object
sender, EventArgs e)
{
if
(checkBox2.Checked ==
true
) checkBox1.Enabled =
false
;
else
checkBox1.Enabled =
true
;
}
private
void
button3_Click(
object
sender, EventArgs e)
{
textBox1.Text =
""
;
textBox3.Text =
""
;
if
(checkBox1.Checked ==
true
|| checkBox2.Checked ==
true
) { checkBox1.Checked =
false
; checkBox2.Checked =
false
; checkBox2.Enabled =
true
; }
else
{ checkBox1.Enabled =
true
; checkBox2.Checked =
false
; }
}
private
void
button5_Click(
object
sender, EventArgs e)
{
a = a + 1;
label7.Text =
"Ad Soyad :"
+ adsoyad[a];
label8.Text =
"Sınıf :"
+ sınıf[a];
label9.Text =
"T.C. Kimlik No :"
+ tckimlik[a];
label10.Text =
"Memleket :"
+ memleket[a];
label11.Text =
"Cinsiyet :"
+ cinsiyet[a];
label12.Text =
"Doğum Tarihi :"
+
do
ğumtarihi[a];
}
private
void
button4_Click(
object
sender, EventArgs e)
{
a = a - 1;
label7.Text =
"Ad Soyad :"
+ adsoyad[a];
label8.Text =
"Sınıf :"
+ sınıf[a];
label9.Text =
"T.C. Kimlik No :"
+ tckimlik[a];
label10.Text =
"Memleket :"
+ memleket[a];
label11.Text =
"Cinsiyet :"
+ cinsiyet[a];
label12.Text =
"Doğum Tarihi :"
+
do
ğumtarihi[a];
}
}
}
Hiç yorum yok:
Yorum Gönder