private void btnStokDuzenle_Click(object sender, EventArgs e) { string secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString(); FrmStokİslem f = new FrmStokİslem(stokdal.GetByFilter(context, c => c.StokKodu == secilen)); f.Show(); }
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 simpleButton2_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;//gridviewden çıkart databaseden silme }
private void btnDuzenle_Click(object sender, EventArgs e) { NetSatisContext context = new NetSatisContext(); StokDal stokDal = new StokDal(); secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString(); FrmStokIslem form = new FrmStokIslem(stokDal.GetByFilter(context, c => c.StokKodu == secilen)); form.ShowDialog(); if (form.saved) { GetAll(); } }
private void btnKopyala_Click(object sender, EventArgs e) { NetSatisContext context = new NetSatisContext(); StokDal stokDal = new StokDal(); secilen = gridView1.GetFocusedRowCellValue(colStokKodu).ToString(); Entities.Tables.Stok stokEntity = new Entities.Tables.Stok(); stokEntity = stokDal.GetByFilter(context, c => c.StokKodu == secilen); stokEntity.Id = -1; stokEntity.StokKodu = null; FrmStokIslem form = new FrmStokIslem(stokEntity); form.ShowDialog(); if (form.saved) { GetAll(); } }