public ActionResult DeleteConfirmed(int id) { //new ArticleCategoryDAL().Delete(id); var aCate = new ArticleCategoryDAL().ViewDetail(id); aCate.IsActive = false; var _dal = new ArticleCategoryDAL(); var _result = _dal.Update(aCate); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ArticleCategoryID,ArticleCategoryName,Description,Image,MetaTitle,ParentID,DisplayOrder,SeoTitle,MetaDescription,MetaKeywords,CreateDate,CreateUser,ModifiedDate,ModifiedUser,IsActive")] ArticleCategory articleCategory) { var UserSession = (UserLogin)Session[TechDeviShopVs002.Common.CommonConstants.USER_SESSION]; if (ModelState.IsValid) { var _dal = new ArticleCategoryDAL(); articleCategory.ModifiedUser = UserSession.UserID; var _result = _dal.Update(articleCategory); if (_result) { return(RedirectToAction("Index", "ArticleCategories")); } else { ModelState.AddModelError("", "Cập nhật danh muc bài viết ko thành công"); } } return(View(articleCategory)); }
public void UpdateArticleCategoryEntity(ArticleCategoryEntity entity) { ArticleCategoryDAL dal = new ArticleCategoryDAL(); dal.Update(entity); }