C SHARP � FORM APPL�CAT�ON �LE S�PAR�� UYGULAMASI

Birince form da menu strip ile eklenen menuler arac�l���yla groupbox aktifle�tiriliyor.Groupbox�ta ise sipari� verecek kullan�c�n�n bilgileri isteniyor.Sipari�ler kaydedildikten sonra 2.forma ge�iliyor ve sipari� verme i�lemi ba�l�yor.
                                               
�kinci Forma ge�ildi�inde bir groupbox i�inde checkboxlar yer al�yor bu checkboxlar arac�l��� ile se�ilen telefonlar sipari� al butonuna bas�ld���nda aktif olan siparis listesine yaz�l�yor.�denecek tutar ve siparis detaylar� ekranda g�steriliyor
.                      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FormOdev2
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void groupBoxKisiselBilgiler_Enter(object sender, EventArgs e)
        {
        }
        private void ki�iselBilgilerToolStripMenuItem_Click(object sender, EventArgs e)
        {//Menu strip'e t�kland���nda
            groupBoxKisiselBilgiler.Enabled = true;
            //Kisisel Bilgiler'in bulundu�u groupbox'u aktif ediyoruz
        }
        private void Form1_Load(object sender, EventArgs e)
        {//Form y�klendi�inde
            groupBoxKisiselBilgiler.Enabled = false;//Kisisel bilgiler group box'u pasif ediyoruz.
            buttonListele.Enabled = false;//Listele butonunu pasif ediyoruz
        }
        public static string TCNo, AdSoyad, TelNo, Adres, Cinsiyet, Semt;
        //De�i�kenleri public olarak tan�ml�yoruz.
      public void buttonKaydet_Click(object sender, EventArgs e)
        {//Kaydet butonuna t�kland���nda
           //Textboxlardaki de�erleri de�i�kenlere aktar�yoruz
            TCNo = textBoxTCNo.Text.ToString();
            AdSoyad = textBoxAdSoyad.Text.ToString();
            TelNo = textBoxTelNo.Text.ToString();
            Adres = textBoxAdres.Text.ToString();
            if (radioButtonErkek.Checked == true)
            {
                Cinsiyet = "Erkek";
            }
            else
            {
                Cinsiyet = "Kad�n";
            }
            Semt = comboBoxSemt.Text.ToString();
            buttonListele.Enabled = true;//Listele butonunu aktifle�tiriyoruz.
            //http://www.programlamadersleri.com
       }
      
        private void buttonListele_Click(object sender, EventArgs e)
        {
            Form2 frm2 = new Form2();//Forma ula�mak i�in yeni bir class olu�turuyoruz
            frm2.Show();//Form 2'yi g�steriyoruz
            this.Hide();//Bulundu�umuz formu gizliyoruz
            //http://www.programlamadersleri.com
             
        }
        private void buttonTemizle_Click(object sender, EventArgs e)
        {//Temizle butonuna t�kland���nda textboxtaki de�erleri s�f�rl�yoruz
            textBoxTCNo.Text = "";
            textBoxAdSoyad.Text = "";
            textBoxTelNo.Text = "";
            textBoxAdres.Text = "";
            comboBoxSemt.Text = "";
        }
        private void sipari�G�r�nt�leToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //http://www.programlamadersleri.com
            MessageBox.Show("Programlama Dersleri - Http://www.programlamadersleri.com");
        }
         
    }
}

Form 2
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FormOdev2
{
public partial class Form2 : Form
{ //http://www.programlamadersleri.com
public Form2()
{
InitializeComponent();
}

private void Form2_Load(object sender, EventArgs e)
{//Form 2 y�klendi�inde
groupBoxSiparisListesi.Visible=false;//Siparis listesini gizliyoruz.
//http://www.programlamadersleri.com
}

private void buttonSiparisAl_Click(object sender, EventArgs e)
{ //Siparis al butonuna t�kland���nda
groupBoxSiparisListesi.Visible=true;
//siparis listesi g�r�n�rl���n� aktifle�tiriyoruz
string Siparisler="";//siparisler de�i�kenini olu�turuyoruz
int tutar=0;

if (checkBox1.Checked == true)
{//E�er checkbox checked ise sipari�lere yeni de�er ekliyoruz ve tutar�n� ekliyoruz
Siparisler = "LG G3";
tutar += 1500;

} //http://www.programlamadersleri.com
if (checkBox2.Checked == true)
{
Siparisler = Siparisler + " Samsung Galaxy S3";
tutar += 1700;

} //http://www.programlamadersleri.com
if (checkBox3.Checked == true)
{
Siparisler = Siparisler + " Sony Xperia Z1";
tutar += 1300;

}
if (checkBox4.Checked == true)
{
Siparisler = Siparisler + " Samsung Galaxy S6";
tutar += 2500;

}
if (checkBox5.Checked == true)
{
Siparisler = Siparisler + " Iphone 6";
tutar += 2850;

}
//Listbox'a Form 1'deki textbox de�erlerini ekliyoruz.
listBoxTCKimlikNo.Items.Add(Form1.TCNo);
listBoxAdSoyad.Items.Add(Form1.AdSoyad);
listBoxTelNo.Items.Add(Form1.TelNo);
listBoxAdres.Items.Add(Form1.Adres);
listBoxCinsiyet.Items.Add(Form1.Cinsiyet);
listBoxSemt.Items.Add(Form1.Semt);
listBoxSiparisler.Items.Add(Siparisler);

labelTutar.Text = tutar.ToString() + "TL" ;//Tutar� yazd�r�yoruz.






}

private void pictureBox2_Click(object sender, EventArgs e)
{

}

private void labelTutar_Click(object sender, EventArgs e)
{

}

private void groupBoxSiparisListesi_Enter(object sender, EventArgs e)
{

}
}
}

Yorum Gönder

Recent Posts

https://www.rentacarantalya.net/
 
DeL��� : Film izle
Copyright © 2012 - 2013. DenemeTv

Tasar�m: G�ncel Bilgi