Пример #1
0
 public ActionResult Edit([Bind(Include = "ID,UserName,PassWord,Avatar,CreatedDate,CreatedBy,ModifiedDate,ModifiedBy,Status,IsAdmin")] tbl_UserName tbl_UserName)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_UserName).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_UserName));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID,Title,ContentPost,MetaTitle,DisplayOrder,CategoriesID,CreatedDate,CreatedBy,ModifiedDate,ModifiedBy,MetaKeywords,Status,TagID")] tbl_Posts tbl_Posts)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Posts).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoriesID = new SelectList(db.tbl_CategoriesPosts, "ID", "CategoryName", tbl_Posts.CategoriesID);
     return(View(tbl_Posts));
 }