コード例 #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("Düzenlemek istediğiniz satırı seçin", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            int yakitTuruId = Convert.ToInt32(dataGridView1.SelectedRows[0].Cells[0].Value);

            YakitTuru         yakitTuru = YakitTuruManager.GetObjectById(yakitTuruId);
            frmYakitTuruDetay frm       = new frmYakitTuruDetay(yakitTuru);

            frm.ShowDialog();
        }
コード例 #2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            frmYakitTuruDetay frm = new frmYakitTuruDetay();

            frm.ShowDialog();
        }