private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtCariAdi.Text.Length >= 3 && txtCariAdi.Text != null && txtCariSoyadi.Text.Length >= 5 && txtCariSoyadi.Text != null && txtTelefon.Text != null && txtTelefon.Text != null && txtMail.Text != null &&
         txtVergiDairesi.Text != null && txtBanka.Text != null && txtAdres.Text != null && txtVergiNumarasi.Text != null)
     {
         Cariler cariler = new Cariler();
         cariler.Ad           = txtCariAdi.Text;
         cariler.Soyad        = txtCariSoyadi.Text;
         cariler.Telefon      = txtTelefon.Text;
         cariler.Mail         = txtMail.Text;
         cariler.Il           = lookUpEdit2.Text;
         cariler.Ilce         = lookUpEdit3.Text;
         cariler.VergiDairesi = txtVergiDairesi.Text;
         cariler.VergiNo      = txtVergiNumarasi.Text;
         cariler.Statu        = txtStatu.Text;
         cariler.Banka        = txtBanka.Text;
         cariler.Adres        = txtAdres.Text;
         db.Cariler.Add(cariler);
         db.SaveChanges();
         MessageBox.Show("Cari başarıyla kaydedildi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Lütfen tüm alanları eksiksiz doldurunuz.", "Hata");
     }
 }
 private void btnGuncelle_Click(object sender, EventArgs e)
 {
     if (checkEdit1.Checked == true)
     {
         int id    = int.Parse(txtId.Text);
         var deger = db.Notlar.Find(id);
         deger.Durum = true;
         db.SaveChanges();
         MessageBox.Show("Not okundu olarak işaretlendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Urunler urunler = new Urunler();

            urunler.Ad         = txtUrunAdi.Text;
            urunler.Marka      = txtMarka.Text;
            urunler.Satis      = decimal.Parse(txtSatisFiyat.Text);
            urunler.Alis       = decimal.Parse(txtAlisFiyat.Text);
            urunler.Stok       = short.Parse(txtStok.Text);
            urunler.Durum      = false;
            urunler.KategoriId = byte.Parse(lookUpEdit1.EditValue.ToString());
            db.Urunler.Add(urunler);
            db.SaveChanges();
            MessageBox.Show("Ürün başarıyla kaydedildi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 private void btnSil_Click(object sender, EventArgs e)
 {
     if (txtId.Text != null)
     {
         int id    = int.Parse(txtId.Text);
         var deger = db.Bolumler.Find(id);
         db.Bolumler.Remove(deger);
         db.SaveChanges();
         MessageBox.Show("Bölüm başarıyla silindi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
         BolumListele();
     }
     else
     {
         MessageBox.Show("Bir bölümü seçmelisiniz.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtAd.Text != "" && txtAd.Text.Length <= 30)
     {
         Kategoriler kategori = new Kategoriler();
         kategori.Ad = txtAd.Text;
         db.Kategoriler.Add(kategori);
         db.SaveChanges();
         MessageBox.Show("Kategori başarıyla kaydedildi.");
         KategoriListele();
     }
     else
     {
         MessageBox.Show("Kategori Adı Boş Geçilemez ve Kategori Adı 30 Karakterden Fazla Olamaz");
     }
 }
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtAd.Text.Length >= 3 && txtAd.Text != null && txtSoyad.Text.Length >= 5 && txtSoyad.Text != null && txtTelefon.Text != null && txtTelefon.Text != null && txtMail.Text != null)
     {
         Calisanlar calisanlar = new Calisanlar();
         calisanlar.Ad      = txtAd.Text;
         calisanlar.Soyad   = txtSoyad.Text;
         calisanlar.Bölüm   = int.Parse(lookUpEdit1.EditValue.ToString());
         calisanlar.Telefon = txtTelefon.Text;
         calisanlar.Mail    = txtMail.Text;
         db.Calisanlar.Add(calisanlar);
         db.SaveChanges();
         MessageBox.Show("Calisan başarıyla eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Lütfen bütün alanları eksiksiz giriniz.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            UrunKabuller urunKabuller = new UrunKabuller();
            int          urunid       = int.Parse(id.ToString());
            var          deger        = db.UrunKabuller.Find(urunid);

            deger.UrunDurumDetay = cmbUrunDurumDetay.Text;
            MessageBox.Show("Arızalı ürün durumu güncellendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            db.SaveChanges();
        }
Example #8
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Notlar notlar = new Notlar();

            notlar.Baslik = txtBaslik.Text;
            notlar.Icerik = txtIcerik.Text;
            notlar.Tarih  = DateTime.Parse(txtTarih.Text);
            notlar.Durum  = false;
            db.Notlar.Add(notlar);
            db.SaveChanges();
            MessageBox.Show("Not başarıyla kaydedildi", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            FaturaDetaylar faturaDetaylar = new FaturaDetaylar();

            faturaDetaylar.Adet     = short.Parse(txtAdet.Text);
            faturaDetaylar.Fiyat    = decimal.Parse(txtFiyat.Text);
            faturaDetaylar.Tutar    = decimal.Parse(txtTutar.Text);
            faturaDetaylar.Urun     = txtUrun.Text;
            faturaDetaylar.FaturaId = int.Parse(txtFaturaId.Text);
            db.FaturaDetaylar.Add(faturaDetaylar);
            db.SaveChanges();
            MessageBox.Show("Faturaya ait kalem girişi başarıyla yapıldı.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Example #10
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Calisanlar calisanlar = new Calisanlar();

            calisanlar.Ad      = txtAd.Text;
            calisanlar.Soyad   = txtSoyad.Text;
            calisanlar.Telefon = txtTelefon.Text;
            calisanlar.Mail    = txtMail.Text;
            calisanlar.Bölüm   = int.Parse(txtBolum.Text);
            db.Calisanlar.Add(calisanlar);
            db.SaveChanges();
            MessageBox.Show("Yeni çalışan eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Faturalar faturalar = new Faturalar();

            faturalar.Seri       = txtSeri.Text;
            faturalar.SiraNo     = txtSıraNo.Text;
            faturalar.Saat       = txtSaat.Text;
            faturalar.Tarih      = DateTime.Parse(txtTarih.Text);
            faturalar.VergiDaire = txtVergiDairesi.Text;
            faturalar.Cari       = int.Parse(lookUpEdit1.EditValue.ToString());
            db.Faturalar.Add(faturalar);
            db.SaveChanges();
            MessageBox.Show("Fatura başarıyla eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Example #12
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            UrunHareketler uHareketler = new UrunHareketler();

            uHareketler.Urun       = int.Parse(lookUpEdit2.EditValue.ToString());
            uHareketler.Musteri    = int.Parse(lookUpEdit1.EditValue.ToString());
            uHareketler.Tarih      = DateTime.Parse(txtTarih.EditValue.ToString());
            uHareketler.Adet       = byte.Parse(txtAdet.Text);
            uHareketler.Fiyat      = decimal.Parse(txtSatisFiyati.Text);
            uHareketler.UrunSeriNo = txtSeriNo.Text;
            db.UrunHareketler.Add(uHareketler);
            db.SaveChanges();
            MessageBox.Show("Ürün satışı eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtSeriNo.Text != null && txtSeriNo.Text.Length == 5 && lookUpId.EditValue != null && cbxUrunDurumDetay.Text != null)
     {
         UrunKabuller urunKabuller = new UrunKabuller();
         urunKabuller.Musteri        = int.Parse(lookUpId.EditValue.ToString());
         urunKabuller.GelisTarihi    = DateTime.Parse(txtTarih.Text);
         urunKabuller.UrunSeriNo     = txtSeriNo.Text;
         urunKabuller.UrunDurum      = true;
         urunKabuller.UrunDurumDetay = cbxUrunDurumDetay.Text;
         db.UrunKabuller.Add(urunKabuller);
         db.SaveChanges();
         MessageBox.Show("Arızalı ürün kaydedildi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            Cariler cariler = new Cariler();

            cariler.Ad           = txtAd.Text;
            cariler.Soyad        = txtSoyad.Text;
            cariler.Il           = lookUpEdit2.Text;
            cariler.Ilce         = lookUpEdit3.Text;
            cariler.Mail         = txtMail.Text;
            cariler.Statu        = txtStatu.Text;
            cariler.Telefon      = txtTelefon.Text;
            cariler.VergiDairesi = txtVergiDairesi.Text;
            cariler.VergiNo      = txtVergiNumarasi.Text;
            db.Cariler.Add(cariler);
            db.SaveChanges();
            MessageBox.Show("Yeni cari başarılı bir şekilde eklendi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtAd.Text.Length >= 3 && txtSoyad != null && txtSoyad.Text.Length >= 4 && txtSifre.Text == txtSifreTekrar.Text &&
         txtMail.Text != null && txtKullaniciAdi.Text.Length >= 5 && txtSifre.Text.Length >= 5 &&
         txtTelefon.Text != null && lookUpEdit1.EditValue != null && lookUpEdit2.EditValue != null)
     {
         Calisanlar calisan = new Calisanlar();
         calisan.Ad           = txtAd.Text;
         calisan.Soyad        = txtSoyad.Text;
         calisan.KullaniciAdı = txtKullaniciAdi.Text;
         calisan.Sifre        = txtSifre.Text;
         calisan.Mail         = txtMail.Text;
         calisan.RoleId       = int.Parse(lookUpEdit2.EditValue.ToString());
         calisan.Bölüm        = int.Parse(lookUpEdit2.EditValue.ToString());
         calisan.Telefon      = txtTelefon.Text;
         db.Calisanlar.Add(calisan);
         db.SaveChanges();
         MessageBox.Show("Kayıt başarıyla oluşturuldu.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         MessageBox.Show("Lütfen bütün alanları eksiksiz bir şekilde doldurun, aksi taktirde kayıt yapılamayacaktır.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }