예제 #1
0
파일: frmStok.cs 프로젝트: damar89/EmdErp
 private void btnKopyala_Click(object sender, EventArgs e)
 {
     try
     {
         if (gridView1.RowCount != 0)
         {
             secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId));
             Entities.Tables.Stok stokEntity = new Entities.Tables.Stok();
             stokEntity = stokDal.GetByFilter(context, c => c.Id == secilen);
             frmStokIslem form = new frmStokIslem(stokEntity, true);
             form.ShowDialog();
             if (form.saved)
             {
                 btnSorgula.PerformClick();
             }
         }
         else
         {
             MessageBox.Show("Seçili Stok Bulunamadı");
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Seçili Stok Bulunamadı");
     }
 }
예제 #2
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();
        }
예제 #3
0
파일: frmStok.cs 프로젝트: damar89/EmdErp
        private void btnEkle_Click(object sender, EventArgs e)
        {
            frmStokIslem form = new frmStokIslem(new Entities.Tables.Stok());

            form.ShowDialog();
            if (form.saved)
            {
                btnSorgula.PerformClick();
            }
        }
예제 #4
0
파일: frmStok.cs 프로젝트: damar89/EmdErp
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId));
            frmStokIslem form = new frmStokIslem(stokDal.GetByFilter(context, c => c.Id == secilen));

            form.ShowDialog();
            if (form.saved)
            {
                GetAll();
            }
        }
예제 #5
0
파일: frmStok.cs 프로젝트: damar89/EmdErp
 private void btnStokKopyalaHizli_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId));
         Entities.Tables.Stok stokEntity = new Entities.Tables.Stok();
         stokEntity = stokDal.GetByFilter(context, c => c.Id == secilen);
         frmStokIslem form = new frmStokIslem(stokEntity, true);
         form.ShowDialog();
         if (form.saved)
         {
             btnSorgula.PerformClick();
         }
     }
     catch (Exception)
     {
     }
 }
예제 #6
0
 private void btnKopyala_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (gridStoklar.RowCount != 0)
     {
         sec = Convert.ToInt32(gridStoklar.GetFocusedRowCellValue(colId));
         Entities.Tables.Stok stokEntity = new Entities.Tables.Stok();
         var          r    = context.Stoklar.Include("Barkod").FirstOrDefault(x => x.Id == sec);
         frmStokIslem form = new frmStokIslem(r, true);
         form.ShowDialog();
         if (form.saved)
         {
             #region eski kod
             //TumStoklar = stokDal.StokSec(context);
             //OnPropertyChanged(nameof(TumStoklar));
             #endregion
             btnSorgula.PerformClick();
         }
     }
     else
     {
         MessageBox.Show("Seçili Stok Bulunamadı");
     }
 }
예제 #7
0
 private void btnDuzenle_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (gridStoklar.RowCount != 0)
         {
             //burdaki context ile düzenleme yapsa dahi context yenilenmediği için fisislem veya başka bir yere stok eklemek istediğinde eski context ile stok ekleme işlemi yapmaya çalışıyor haliyle eski düzenlenmemiş veriyi çekecektir.
             //ancak fisislem formu kapatılıp yeniden açılması gerekiyor. düzenle işlemini burdan yapması sağlı değil!
             sec = Convert.ToInt32(gridStoklar.GetFocusedRowCellValue(colId));
             var          r    = context.Stoklar.Include("Barkod").AsNoTracking().FirstOrDefault(x => x.Id == sec);
             frmStokIslem form = new frmStokIslem(ref context, r);
             form.ShowDialog();
         }
         else
         {
             MessageBox.Show("Seçili Stok Bulunamadı");
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #8
0
파일: frmStok.cs 프로젝트: damar89/EmdErp
 private void btnStokDuzenle_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs 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)
             {
                 gridControl1.DataSource = stokDal.StokAdiylaStokGetir(context);
             }
         }
         else
         {
             MessageBox.Show("Seçili Stok Bulunamadı");
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #9
0
        private void btnStokEkle_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmStokIslem form = new frmStokIslem(new Entities.Tables.Stok());

            form.ShowDialog();
        }
예제 #10
0
        private void btnStokTanitim_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            frmStokIslem form = new frmStokIslem(new Entities.Tables.Stok());

            form.ShowDialog();
        }