Ejemplo n.º 1
0
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (cariDal.AddOrUpdate(context, _entity))
     {
         kodOlustur.KodArttirma();
         cariDal.Save(context);
         saved = true;
         MessageBox.Show("Kayıt İşlemi Tamamlanmıştır.");
         this.Close();
     }
     cariDal.Save(context);
 }
Ejemplo n.º 2
0
 private void btnkaydet_Click(object sender, EventArgs e)
 {
     if (cariDal.AddOrUpdate(context, _entity))
     {
         cariDal.Save(context);
         this.Close();
     }
 }
Ejemplo n.º 3
0
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (cariDAL.AddOrUpdate(context, _entity))
     {
         kodolustur.KodArttirma();
         cariDAL.Save(context);
         this.Close();
     }
 }
Ejemplo n.º 4
0
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (_cariDal.AddOrUpdate(_context, _entity))
     {
         _cariDal.Save(_context);
         saved = true;
         this.Close();
     }
 }
Ejemplo n.º 5
0
 private void btnSil_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Seçili Olan Veriyi Silmek İstediğinize Eminmisiniz.?", "Uyarı", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString();
         caridal.Delete(context, c => c.CariKodu == secilen);
         caridal.Save(context);
         GetAll();
     }
 }
Ejemplo n.º 6
0
 private void btnsil_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("secili olan veriyi silmeye emin misiniz", "uyarı", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         string secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString();
         cariDal.Delete(context, c => c.CariKodu == secilen);
         cariDal.Save(context);
         GetAll();
     }
 }
Ejemplo n.º 7
0
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (cariDal.AddOrUpDate(context, _entity))
     {
         kodOlustur.KodArttirma();
         cariDal.Save(context);
         kayitedildi = true;
         FrmCariAnasayfa frm = new FrmCariAnasayfa();
         frm.GetAll();
         this.Close();
     }
 }
Ejemplo n.º 8
0
        private void Form1_Load(object sender, EventArgs e)
        {
            var context = new NetSatisContext();
            var cariDal = new CariDAL();
            var entity  = new Entities.Tables.Cari
            {
                CariKodu     = "123456789",
                CariAdi      = "Can Özaytekin",
                YetkiliKisi  = "Can",
                FaturaUnvani = "Özaytekin"
            };

            cariDal.AddOrUpdate(context, entity);
            cariDal.Save(context);
        }
Ejemplo n.º 9
0
 private void BtnSil_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("Seçili olan veriyi silmek istediğinize emin misiniz?", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
         {
             string secilen = gridView1.GetFocusedRowCellValue(colCariKodu).ToString();
             cariDal.Delete(context, c => c.CariKodu == secilen);
             cariDal.Save(context);
             GetAll();
         }
     }
     catch (Exception)
     {
         //throw;
     }
 }
Ejemplo n.º 10
0
        private void btnSil_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Seçili Olan Veriyi Silmek İstediğinie Eminmisiniz", "Uyarı", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId));

                foreach (var hrkt in context.fisler)
                {
                    if (hrkt.CariId == secilen)
                    {
                        MessageBox.Show("Bu Ürünün Hareketi Bulunmakta Fatura ve Fişlerden Siliniz");
                        return;
                    }
                    else
                    {
                        cariDAL.Delete(context, c => c.Id == secilen);
                        cariDAL.Save(context);
                        GetAll();
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private void Sil()
        {
            if (!CariGridView.RowCount.Equals(0))
            {
                int secilenSatir = (int)CariGridView.GetFocusedRowCellValue(colId);
                logSecilen = CariGridView.GetFocusedRowCellValue(colCariKodu).ToString();

                Entities.Tables.Fis secilen = new Entities.Tables.Fis();

                if (secilen.CariId == secilenSatir)
                {
                    XtraMessageBox.Show("Bu Cariye Ait Hareketler Bulunmaktadır.Silme İşlemi Gerçekleştirilemez.");
                }
                else
                {
                    if (XtraMessageBox.Show("Seçili olan veriyi silmek istediğinize emin misiniz ?", "Uyarı", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        cariDal.Delete(context, c => c.KullaniciID == RoleTool.kullaniciEntity.KullaniciID && c.Id == secilenSatir);
                        cariDal.Save(context);
                        GetAll();
                        GetAll();
                        context.KullaniciLoglari.Add(new KullaniciLog
                        {
                            KullaniciID        = RoleTool.kullaniciEntity.KullaniciID,
                            KullaniciAdi       = RoleTool.kullaniciEntity.KullaniciAdi,
                            YapilanIslem       = "Cari Sil -  " + logSecilen,
                            YapilanIslemTarihi = DateTime.Now
                        });
                        context.SaveChanges();
                    }
                }
            }
            else
            {
                XtraMessageBox.Show("Silinecek Kayıt Bulunamadı.");
            }
        }
Ejemplo n.º 12
0
 private void btnSil_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("Seçili Olan Veriyi Silmek İstediğinize Emin Misiniz ?", "Uyarı", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             KasaHareketDAL dal = new KasaHareketDAL();
             secilen = Convert.ToInt32(gridView1.GetFocusedRowCellValue(colId));
             var hareket = dal.GetAll(context, c => c.CariId == secilen);
             if (hareket.Count > 0)
             {
                 MessageBox.Show("Hareket görmüş bir cari silinemez.");
                 return;
             }
             cariDal.Delete(context, c => c.Id == secilen);
             cariDal.Save(context);
             GetAll();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Seçili bir Cari bulunamadı. ");
     }
 }