Beispiel #1
0
 partial void DeletePages(Pages instance);
Beispiel #2
0
 partial void UpdatePages(Pages instance);
Beispiel #3
0
        public ActionResult EditPage(Pages model)
        {
            dbDataContext db = new dbDataContext();
            Pages page = db.Pages.SingleOrDefault(c => c.id == model.id);
            if (page == null)
            {
                return RedirectToAction("PagesList");
            }

            page.Alias = model.Alias;
            page.Naim = model.Naim;
            page.Text = model.Text;

            db.SubmitChanges();
            return RedirectToAction("PagesList");
        }
Beispiel #4
0
 partial void InsertPages(Pages instance);
Beispiel #5
0
        public ActionResult CreatePage(Pages model)
        {
            dbDataContext db = new dbDataContext();

            db.Pages.InsertOnSubmit(model);
            db.SubmitChanges();

            return RedirectToAction("PagesList");
        }