예제 #1
0
파일: FrmStok.cs 프로젝트: mguler1/Erp
        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();
        }
예제 #2
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;
        }
예제 #3
0
        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
        }
예제 #4
0
        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();
            }
        }
예제 #5
0
        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();
            }
        }