IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   C# (https://www.ircforumlari.net/c/)
-   -   C SHARP – FORM APPLİCATİON İLE SİPARİŞ UYGULAMASI (https://www.ircforumlari.net/c/743786-c-sharp-form-application-ile-siparis-uygulamasi.html)

Kaf_Dağı 20 Mart 2016 15:22

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.

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

İ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.

[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

forum1
Kod:

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
{//
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
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.
            //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
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
            //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
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)
        {
            //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
MessageBox.Show("Programlama Dersleri -
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="margin:20px; margin-top:5px">
Kod:

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
    { //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
public Form2()
        {
            InitializeComponent();
        }
     
        private void Form2_Load(object sender, EventArgs e)
        {//Form 2 yüklendiğinde
          groupBoxSiparisListesi.Visible=false;//Siparis listesini gizliyoruz.
            //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
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;

            } //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
if (checkBox2.Checked == true)
            {
                Siparisler = Siparisler + " Samsung Galaxy S3";
                tutar += 1700;

            } //
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
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)
        {

        }
    }
}



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 12:28.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk