private void KasaHareketTipForm_Load(object sender, EventArgs e) { Text = "Kasalar - Kasa Hareket Tipi"; btnGuncelle.Visible = false; btnIptal.Visible = false; dataGridView1.DataSource = kOrm.Select(); dataGridView1.Columns[0].Visible = false; dataGridView1.Columns[2].Visible = false; }
private void btnEkle_Click(object sender, EventArgs e) { KasaHareketTip kEntity = new KasaHareketTip(); kEntity.Adi = txtAdi.Text.ToString(); bool sonuc = korm.Insert(kEntity); if (sonuc) { MessageBox.Show("Kayıt Eklenmiştir"); dataGridView1.DataSource = korm.Select(); } else { MessageBox.Show("Kayıt eklenirken hata oluştu"); } }
private void KasaHareketForm_Load(object sender, EventArgs e) { Text = "Kasalar - Kasa Hareket"; dataGridView1.DataSource = kHarOrm.Select(); dataGridView1.Columns[0].Visible = false; KasaORM kasaOrm = new KasaORM(); cmbKasaTip.DataSource = kasaOrm.Select(); cmbKasaTip.DisplayMember = "Adi"; cmbKasaTip.ValueMember = "Id"; KasaHareketTipORM khTipOrm = new KasaHareketTipORM(); cmbKasaHareket.DataSource = khTipOrm.Select(); cmbKasaHareket.DisplayMember = "Adi"; cmbKasaHareket.ValueMember = "Id"; }