// Kategori güncelle sayfasında formdan gelen işlemleri yapar kendine özel bir View'i yoktur.
        public ActionResult KGuncelle(Tbl_Kategori p1)
        {
            var kategoriler = db.Tbl_Kategori.Find(p1.KategoriID);

            kategoriler.KategoriAdi = p1.KategoriAdi;
            db.SaveChanges();
            return(RedirectToAction("KategoriIslemleri"));
        }
Ejemplo n.º 2
0
        public ActionResult Guncelle(Tbl_Kategori t1)
        {
            var ktg = db.Tbl_Kategori.Find(t1.KategoriId);

            ktg.KategordiAd = t1.KategordiAd;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 3
0
        //GÜNCELLEME İŞLEMİ YAPAR
        public ActionResult TamGuncelle(Tbl_Kategori k)
        {
            var ktg = db.Tbl_Kategori.Find(k.id);

            ktg.Ad = k.Ad;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Tbl_Kategori t = new Tbl_Kategori();

            t.KATEGORIAD = TextBox1.Text;
            db.Tbl_Kategori.Add(t);
            db.SaveChanges();
            Response.Redirect("Kategoriler.aspx");
        }
Ejemplo n.º 5
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            Tbl_Kategori ktgr = new Tbl_Kategori();

            ktgr.AD = TxtKategoriAd.Text;
            db.Tbl_Kategori.Add(ktgr);
            db.SaveChanges();
            MessageBox.Show("Kategori Başarılı Bir Şekilde Kaydedildi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Ejemplo n.º 6
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            Tbl_Kategori ekle = new Tbl_Kategori();

            ekle.AD = TxtKategoriAD.Text;
            db.Tbl_Kategori.Add(ekle);
            db.SaveChanges();
            MessageBox.Show("Kategori Başarılı Bir Şekilde Kaydedildi", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            listele();
        }
Ejemplo n.º 7
0
 public ActionResult YeniKategori(Tbl_Kategori t1)
 {
     if (!ModelState.IsValid)
     {
         return(View("YeniKategori"));
     }
     db.Tbl_Kategori.Add(t1);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 8
0
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     if (txtKategoriAd.Text != "" && txtKategoriAd.Text.Length <= 50)
     {
         Tbl_Kategori kategori = new Tbl_Kategori();
         kategori.ID  = int.Parse(txtKategoriId.Text);
         kategori.Adi = txtKategoriAd.Text;
         db.Tbl_Kategori.Add(kategori);
         db.SaveChanges();
         MessageBox.Show("Kategori Ekleme İşlemi Başarılı", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Listele();
     }
     else
     {
         MessageBox.Show("Lütfen Girdiğiniz Değerleri Kontrol Ediniz", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Listele();
     }
 }
Ejemplo n.º 9
0
 private void btnKaydet_Click(object sender, EventArgs e)
 {
     try
     {
         DboTeknikServisEntities1 db = new DboTeknikServisEntities1();
         if (txtKategoriAd.Text != "" && txtKategoriAd.Text.Length <= 50)
         {
             Tbl_Kategori kategori = new Tbl_Kategori();
             kategori.Adi = txtKategoriAd.Text;
             db.Tbl_Kategori.Add(kategori);
             db.SaveChanges();
             MessageBox.Show("Kategori Ekleme Başarılı", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show("Lütfen Girdiğiniz Değerleri Kontrol Ediniz", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Kategori Eklenirken Hata Oluştu !", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 public ActionResult KategoriEkle(Tbl_Kategori k)
 {
     db.Tbl_Kategori.Add(k);
     db.SaveChanges();
     return(View());
 }
Ejemplo n.º 11
0
 public ActionResult YeniKategori(Tbl_Kategori p)
 {
     db.Tbl_Kategori.Add(p);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }