Example #1
0
        public ActionResult Edit(SafeCategory_Object safeCategoryObject)
        {
            if (ModelState.IsValid)
            {
                var result = new SafeCategory_BCL().InsertOrUpdate(true, safeCategoryObject);
                if (result)
                {
                    return(RedirectToAction("Index", "SafeCategory"));
                }
                ModelState.AddModelError("", "Cập nhật không thành công");
            }

            return(View(safeCategoryObject));
        }
Example #2
0
        // GET: Admin/SafeCategory/Delete/5
        public JsonResult Delete(Guid id)
        {
            var result = new SafeCategory_BCL().Delete(id);

            return(Json(result ? new { rs = true } : new { rs = false }));
        }
Example #3
0
        // GET: Admin/SafeCategory/Edit/5
        public ActionResult Edit(Guid id)
        {
            var safeCategoryObject = new SafeCategory_BCL().GetById(id);

            return(View(safeCategoryObject));
        }
Example #4
0
        // GET: Admin/SafeCategory
        public ActionResult Index()
        {
            var listSafeCategory = new SafeCategory_BCL().GetAll();

            return(View(listSafeCategory));
        }