Beispiel #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            BONUSASPDBEntities db = new BONUSASPDBEntities();
            TBLKATEGORI        t  = new TBLKATEGORI();

            t.KATEGORIAD = TextBox1.Text;
            db.TBLKATEGORI.Add(t);
            db.SaveChanges();
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BONUSASPDBEntities db = new BONUSASPDBEntities();
            int id = Convert.ToInt32(Request.QueryString["KATEGORIID"].ToString());
            var p  = db.TBLKATEGORI.Find(id);

            db.TBLKATEGORI.Remove(p);
            db.SaveChanges();
            Response.Redirect("Kategoriler.aspx");
        }
Beispiel #3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            BONUSASPDBEntities db = new BONUSASPDBEntities();
            TBLKATEGORI        t  = new TBLKATEGORI();

            t.KATEGORIAD = TextBox1.Text;
            db.TBLKATEGORI.Add(t);
            db.SaveChanges();
            Response.Redirect("Kategoriler.Aspx");
        }