Ejemplo n.º 1
0
      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();
      }
Ejemplo n.º 2
0
        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();
                }
            }
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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();
            }
        }
Ejemplo n.º 5
0
        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();
            }
        }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
 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;
     }
 }
Ejemplo n.º 8
0
 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ı");
     }
 }