private void frmSiparis_Load(object sender, EventArgs e)
        {
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            lblMasaNo.Text   = cGenel._ButtonValue;

            cMasalar ms = new cMasalar();

            TableId = ms.TableGetByNumber(cGenel._ButtonName);

            if (ms.TableGetByState(TableId, 2) == true)
            {
                cAdisyon Ad = new cAdisyon();
                AdditionId = Ad.GetByAddition(TableId);
                cSiparis orders = new cSiparis();
                orders.GetByOrder(lvSiparisler, AdditionId);
            }

            btn1.Click += new EventHandler(islem);
            btn2.Click += new EventHandler(islem);
            btn3.Click += new EventHandler(islem);
            btn4.Click += new EventHandler(islem);
            btn5.Click += new EventHandler(islem);
            btn6.Click += new EventHandler(islem);
            btn7.Click += new EventHandler(islem);
            btn8.Click += new EventHandler(islem);
            btn9.Click += new EventHandler(islem);
            btn0.Click += new EventHandler(islem);



            // ms.MasalariDurumaGoreGetir(cbMasalar);
        }
        private void btnSiparis_Click(object sender, EventArgs e)
        {
            /*
             * 1-masa boş
             * 2-masa dolu
             */

            cMasalar Masa        = new cMasalar();
            cAdisyon NewAddition = new cAdisyon();
            cSiparis SaveOrder   = new cSiparis();

            frmMasalar ms = new frmMasalar();

            bool sonuc = false;


            if (Masa.TableGetByState(TableId, 1) == true)
            {
                NewAddition.PERSONELID = 1;
                NewAddition.MASAID     = TableId;
                NewAddition.TARIH      = DateTime.Now;
                sonuc = NewAddition.SetByAdditionNew(NewAddition);
                Masa.SetChangeTableState(cGenel._ButtonName, 2);

                if (lvSiparisler.Items.Count > 0)
                {
                    for (int i = 0; i < lvSiparisler.Items.Count; i++)
                    {
                        SaveOrder.MasaId    = TableId;
                        SaveOrder.UrunId    = Convert.ToInt32(lvSiparisler.Items[i].SubItems[2].Text);
                        SaveOrder.AdisyonId = NewAddition.GetByAddition(TableId);
                        SaveOrder.Adet      = Convert.ToInt32(lvSiparisler.Items[i].SubItems[1].Text);
                        SaveOrder.SetSaveOrder(SaveOrder);
                    }

                    this.Close();
                    ms.Show();
                }
            }
            else if (Masa.TableGetByState(TableId, 2) == true)
            {
                if (lvYeniEklenenler.Items.Count > 0)
                {
                    for (int i = 0; i < lvYeniEklenenler.Items.Count; i++)
                    {
                        SaveOrder.MasaId    = TableId;
                        SaveOrder.Adet      = Convert.ToInt32(lvYeniEklenenler.Items[i].SubItems[2].Text);
                        SaveOrder.AdisyonId = NewAddition.GetByAddition(TableId);
                        SaveOrder.UrunId    = Convert.ToInt32(lvYeniEklenenler.Items[i].SubItems[1].Text);
                        SaveOrder.SetSaveOrder(SaveOrder);
                    }
                }

                if (silinenler.Count > 0)
                {
                    foreach (string item in silinenler)
                    {
                        SaveOrder.SetDeleteOrder(Convert.ToInt32(item));
                    }
                }

                this.Close();
                ms.Show();
            }
        }