Exemplo n.º 1
0
        private void btnEkle_Click(object sender, EventArgs e)
        {
            adisyon  adisyon = new adisyon();
            ListView liste;

            if (lbUrunTuru.Text == "icecek")
            {
                liste = lvIcecek;
            }
            else if (lbUrunTuru.Text == "yiyecek")
            {
                liste = lvYiyecek;
            }
            else
            {
                liste = lvTatlilar;
            }

            ListViewItem item = liste.SelectedItems[0];

            adisyon.UrunEkle(item.SubItems[1].Text, item.SubItems[2].Text, lbUrunTuru.Text, lblMasaNo.Text, lbAdSoyad.Text);
            lvUrunler.Items.Clear();
            adisyon.UrunGoster(lblMasaNo.Text, lvUrunler);

            int gelendeger = adisyon.masaDurumuDegistir(lblMasaNo.Text, "2");

            durumGuncelle();
        }
Exemplo n.º 2
0
        private void text_changed(object sender, EventArgs e)
        {
            string masano = lbMasaNo.Text;

            lvAdisyon.Items.Clear();
            adisyon adisyon = new adisyon();

            adisyon.UrunGoster(masano, lvAdisyon);
        }
Exemplo n.º 3
0
        private void btnSil_Click(object sender, EventArgs e)
        {
            adisyon adisyon = new adisyon();

            if (lbMasaNo.Text != "" && lbId.Text != "")
            {
                string masano = lbMasaNo.Text;
                adisyon.UrunSil(Convert.ToInt32(lbId.Text));
                lvAdisyon.Items.Clear();
                adisyon.UrunGoster(masano, lvAdisyon);
                if (lvAdisyon.Items.Count == 0)
                {
                    adisyon.masaDurumuDegistir(masano, "0");
                    durumGuncelle();
                }
            }
        }
Exemplo n.º 4
0
        private void text_changed(object sender, EventArgs e)
        {
            string masano = lblMasaNo.Text;

            lvUrunler.Items.Clear();
            adisyon adisyon = new adisyon();

            adisyon.UrunGoster(masano, lvUrunler);
            int gelenDeger = adisyon.rezervemasamı(lblMasaNo.Text);

            if (gelenDeger == 1)
            {
                cbRezerve.Checked = true;
            }
            else if (gelenDeger == 2)
            {
                cbRezerve.Enabled = false;
            }
            else
            {
                cbRezerve.Checked = false;
            }
        }
Exemplo n.º 5
0
        private void btnOde_Click(object sender, EventArgs e)
        {
            if (lvAdisyon.SelectedItems.Count > 0)
            {
                ListViewItem item = lvAdisyon.SelectedItems[0];
                string       para = item.SubItems[2].Text;
                ParaMiktarGetir(para);
            }

            adisyon adisyon = new adisyon();

            if (lbMasaNo.Text != "" && lbId.Text != "")
            {
                string masano = lbMasaNo.Text;
                adisyon.UrunSil(Convert.ToInt32(lbId.Text));
                lvAdisyon.Items.Clear();
                adisyon.UrunGoster(masano, lvAdisyon);
                if (lvAdisyon.Items.Count == 0)
                {
                    adisyon.masaDurumuDegistir(masano, "0");
                    durumGuncelle();
                }
            }
        }