private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            Bitis b = new Bitis();

            b.Show();
            this.Hide();
        }
 private void radioButton1_CheckedChanged(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         provider.SetError(textBox1, "BU ALAN BOŞ GEÇİLEMEZ!!");
     }
     else
     {
         //facade pattern cagırma
         string               UrunAdi1      = label1.Text;
         string               UrunAdi2      = label2.Text;
         int                  Adet1         = Convert.ToInt16(textBox1.Text);
         int                  Adet2         = Convert.ToInt16(textBox1.Text);
         SiparisFacade        siparisFacade = new SiparisFacade();
         List <SepettekiUrun> urunler       = new List <SepettekiUrun>
         {
             new SepettekiUrun {
                 Id = 1, UrunAdi = UrunAdi1, Adet = Adet1
             },
             new SepettekiUrun {
                 Id = 2, UrunAdi = UrunAdi2, Adet = Adet2
             },
         };
         siparisFacade.SiparisVer(UrunAdi1, UrunAdi2, urunler);
         Bitis b = new Bitis();
         b.Show();
         this.Hide();
     }
 }
Esempio n. 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            int sayi1, sayi2, sonuc;

            sayi1 = Convert.ToInt32(textBox3.Text);
            sayi2 = Convert.ToInt32(textBox4.Text);
            Operasyon operasyon;

            if (radioButton1.Checked == true)
            {
                //template pattern cagırma
                operasyon = new Toplama();
                sonuc     = operasyon.OpHazirla(sayi1, sayi2);
                MessageBox.Show(sonuc.ToString(), "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Bitis b = new Bitis();
                b.Show();
                this.Hide();
            }
            else if (radioButton2.Checked == true)
            {
                //tepmlate pattern cagırma
                operasyon = new Bolme();
                sonuc     = operasyon.OpHazirla(sayi1, sayi2);
                MessageBox.Show(sonuc.ToString(), "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Bitis b = new Bitis();
                b.Show();
                this.Hide();
            }
            else if (radioButton3.Checked == true)
            {
                //tepmlate pattern cagırma
                operasyon = new Cikarma();
                sonuc     = operasyon.OpHazirla(sayi1, sayi2);
                MessageBox.Show(sonuc.ToString(), "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Bitis b = new Bitis();
                b.Show();
                this.Hide();
            }
            else if (radioButton4.Checked == true)
            {
                //tepmlate pattern cagırma
                operasyon = new Carpma();
                sonuc     = operasyon.OpHazirla(sayi1, sayi2);
                MessageBox.Show(sonuc.ToString(), "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Bitis b = new Bitis();
                b.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Lütfen Boş Alanları doldurunuz!", "Uyarı!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked == true)
            {
                ProductManager productManager = new ProductManager(new AyakkabıAdapter());
                productManager.Save();
            }
            else
            {
                ProductManager productManager = new ProductManager(new Canta());
                productManager.Save();
            }
            Bitis b = new Bitis();

            b.Show();
            this.Hide();
        }