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