1 Kasım 2013 Cuma

C# da Askerlik Durumu Hesaplama Programı

C# Askerlik durumunu hesaplaya program

private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton1.Checked==true)
            {
                radioButton3.Enabled = false;
                radioButton4.Enabled = false;
                radioButton5.Enabled = true;
                radioButton5.Checked = true;

            }
        }
        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked==true)
            {
                radioButton3.Enabled = true;
                radioButton4.Enabled = true;
                radioButton5.Enabled = false;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int    s=0;
            string ad = textBox1.Text;
            string c = "", adrumu = "";
            string t = Convert.ToString(comboBox1.SelectedItem);
            if (radioButton1.Checked== true)
       {
              c="k";
       }
            if (radioButton2.Checked==true)
       {
              c="e";
       }
            if (radioButton3.Checked==true)
       {
              adrumu="yapmadı";
       }
            if (radioButton4.Checked==true)
       {
              adrumu="yaptı";

       }
            if (radioButton5.Checked==true)
       {
              adrumu="muaf";
       }
            s = s + 1;
            listBox1.Items.Add(s+"  " + ad+ "   "+c+"     " + adrumu+  "   "+t);
       
            label2.Text = Convert.ToString(s);
   

        }



C#
C#

0 yorum :

Yorum Gönder