예제 #1
0
        private void Button3_Click(object sender, EventArgs e)
        {
            // Sil

            DialogResult dr = MessageBox.Show("Silmek istediğinize emin misiniz?", "DİKKAT", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (dr == DialogResult.No)
            {
                return;
            }

            if (txtMODUL_REFNO.Text != "")
            {
                MODUL m = new MODUL();
                m.MODUL_REFNO = Convert.ToInt32(txtMODUL_REFNO.Text);
                m.Delete();
                dbtables.MODULS          = MODUL.Load();
                dataGridView1.DataSource = dbtables.MODULS;
            }
        }
예제 #2
0
        private void Button2_Click(object sender, EventArgs e)
        {
            // Kaydet
            MODUL m = new MODUL();

            if (txtMODUL_REFNO.Text != "")
            {
                m.MODUL_REFNO = Convert.ToInt32(txtMODUL_REFNO.Text);
                m.MODUL_ADI   = txtMODUL_ADI.Text;
                m.Update();
            }
            else
            {
                m.MODUL_ADI = txtMODUL_ADI.Text;
                m.Insert();
            }

            dbtables.MODULS          = MODUL.Load();
            dataGridView1.DataSource = dbtables.MODULS;
        }