Esempio n. 1
0
 public ActionResult DeleteContactArticle(ContactArticle vm)
 {
     Repository.Delete(Repository.GetContactArticle(vm.Id));
     Repository.Save();
     return RedirectToAction("contactarticles");
 }
Esempio n. 2
0
 public ActionResult EditContactArticle(ContactArticle vm)
 {
     if (!ModelState.IsValid) return View(vm);
     UpdateModel(Repository.GetContactArticle(vm.Id));
     Repository.Save();
     return RedirectToAction("contactarticles");
 }
Esempio n. 3
0
 public ActionResult CreateContactArticle()
 {
     var vm = new ContactArticle
         {
             SequenceIdentifier = int.MaxValue
         };
     return View(vm);
 }
Esempio n. 4
0
 public ActionResult CreateContactArticle(ContactArticle vm)
 {
     if (!ModelState.IsValid) return View(vm);
     Repository.Add(vm);
     Repository.Save();
     return RedirectToAction("contactarticles");
 }
Esempio n. 5
0
 partial void DeleteContactArticle(ContactArticle instance);
Esempio n. 6
0
 partial void UpdateContactArticle(ContactArticle instance);
Esempio n. 7
0
 partial void InsertContactArticle(ContactArticle instance);
Esempio n. 8
0
 public void Delete(ContactArticle article)
 {
     _db.ContactArticles.DeleteOnSubmit(article);
 }
Esempio n. 9
0
 public void Add(ContactArticle article)
 {
     _db.ContactArticles.InsertOnSubmit(article);
 }