Beispiel #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            var       col      = db.GetCollection <bolum_DTO>("Bolum");
            bolum_DTO selected = null;

            try
            {
                selected = (bolum_DTO)listBox1.SelectedItem;
            }
            catch (Exception)
            {
                lblstatus.Text = "Lütfen Bir Bölüm Seçin";
                return;
            }

            col.Delete(selected.id);
            lblstatus.Text = "Silindi: " + selected.name;
            listBox1.Items.Remove(listBox1.SelectedItem);
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            bolum_DTO sec_bolum = null;

            try
            {
                sec_bolum = (bolum_DTO)comboBox2.SelectedItem;
            }
            catch (Exception)
            {
                lblstatus.Text = "Lütfen Bir bölüm Seçin";
                return;
            }

            List <bolum_DTO> toupdate = new List <bolum_DTO>();

            toupdate.Add(sec_bolum);
            Thread th = new Thread(() => { Updater(toupdate, true); });

            th.Start();
        }