Beispiel #1
0
        private void BtnSil_Click(object sender, EventArgs e)
        {
            if (PROMOSYON_KODU.Text != "" && PromosyonGrid.isRecordAvailable("PROMOSYON_KODU", PROMOSYON_KODU.Text))
            {
                if (GotoMessage.Question("Sil Kontrol", "Kayıt Silinecek.\nEmin Misiniz?") == DialogResult.Yes)
                {
                    string     delStr  = "DELETE FROM TBLPROMOSYON WHERE PROMOSYON_KODU = '" + PROMOSYON_KODU.Text + "'";
                    WebService service = new WebService();
                    service.SQLText = delStr;
                    service.Open();
                    if (service.errorCode == "0")
                    {
                        WebService qryDelResim = new WebService();
                        qryDelResim.SQLText = "DELETE FROM TBLRESIM WHERE TABLO_ADI = 'TBLPROMOSYON' AND TABLO_DEGER = '" + PROMOSYON_KODU.Text + "'";
                        qryDelResim.Open();

                        GotoMessage.ShowMessage("Bilgi", "Kayıt Silme İşlemi Tamamlandı");
                        PanelClear();
                        PROMOSYON_KODU.Focus();
                        RefreshGrid();
                    }
                    else
                    {
                        GotoMessage.ShowMessage("Hata", "Kayıt Silme İşleminde Hatayla Karşılaşıldı.\nHata: " + service.description);
                    }
                }
            }
        }
Beispiel #2
0
        private void PanelClear(bool keyClear = true)
        {
            if (keyClear)
            {
                PROMOSYON_KODU.Text = "";
            }
            PROMOSYON_TANIMI.Text  = "";
            PUAN.Text              = "";
            ACIKLAMA.Text          = "";
            PASIF_MI.SelectedIndex = 0;
            STOK_ADEDI.Text        = "";
            PROMOSYON_RESIM.Image  = Goto724Lib.noImage;
            imageList.Clear();
            imageIndex         = 0;
            lblResimSayac.Text = "1/1";

            if (keyClear)
            {
                PROMOSYON_KODU.Focus();
            }
            else
            {
                PROMOSYON_TANIMI.Focus();
            }
        }