private void btnduzenle_Click(object sender, EventArgs e) { string secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString(); FrmStokIslem form = new FrmStokIslem(stokdal.GetByFilter(context, c => c.StokKodu == secilen)); form.ShowDialog(); }
private void Duzenle() { if (gridStok.RowCount.Equals(0)) { XtraMessageBox.Show("Düzenelencek Kayıt Bulunamadı."); } else { secilen = Convert.ToInt32(gridStok.GetFocusedRowCellValue(colId)); logSecilen = gridStok.GetFocusedRowCellValue(colStokKodu).ToString(); FrmStokIslem form = new FrmStokIslem(stokDal.GetByFilter(context, c => c.KullaniciID == RoleTool.kullaniciEntity.KullaniciID && c.Id == secilen)); form.ShowDialog(); if (form.stokkayitedildi) { GetAll(); context.KullaniciLoglari.Add(new KullaniciLog { KullaniciID = RoleTool.kullaniciEntity.KullaniciID, KullaniciAdi = RoleTool.kullaniciEntity.KullaniciAdi, YapilanIslem = "Stok Düzenle - " + logSecilen, YapilanIslemTarihi = DateTime.Now }); context.SaveChanges(); } } }
private void btnDuzenle_Click(object sender, EventArgs e) { secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId)); frmStokIslem form = new frmStokIslem(stokDAL.GetByFilter(context, c => c.Id == secilen)); form.ShowDialog(); }
private void BtnDuzenle_Click(object sender, EventArgs e) { secilen = gridViewStok.GetFocusedRowCellValue(colStokKodu).ToString(); frmStokislem form = new frmStokislem(stokDal.GetByFilter(context, c => c.StokKodu == secilen)); form.ShowDialog(); if (form.saved) { Listele(); } }
private void btnDuzenle_Click(object sender, EventArgs e) { secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString(); FrmStokIslem frm = new FrmStokIslem(_stokDAL.GetByFilter(context, s => s.StokKodu == secilen)); frm.ShowDialog(); if (frm.saved) { GetAll(); } }
private void btnCikar_Click(object sender, EventArgs e) { var secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString(); var result = stokDAL.GetByFilter(context, c => c.StokKodu == secilen); context.Entry(result).State = EntityState.Detached; }
private void BtnCikar_Click(object sender, EventArgs e) { if (gridTopluDegistir.RowCount.Equals(0)) { XtraMessageBox.Show("Çıkarılacak Kayıt Bulunamadı."); } else { var secilen = (int)gridTopluDegistir.GetFocusedRowCellValue(colId); var result = stokDal.GetByFilter(context, c => c.KullaniciID == RoleTool.kullaniciEntity.KullaniciID && c.Id == secilen); context.Entry(result).State = EntityState.Detached; } }
private void btnDuzenle_Click(object sender, EventArgs e) { try { if (gridView1.RowCount != 0) { secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId)); frmStokIslem form = new frmStokIslem(stokDal.GetByFilter(context, c => c.Id == secilen)); form.ShowDialog(); if (form.saved) { btnSorgula.PerformClick(); } } else { MessageBox.Show("Seçili Stok Bulunamadı"); } } catch (Exception) { MessageBox.Show("Seçili Stok Bulunamadı"); } }