コード例 #1
0
        public ActionResult Edit(DIEN dien)
        {
            if (ModelState.IsValid)
            {
                var dao = new QLDModel();


                var result = dao.Update(dien);
                if (result == true)
                {
                    SetAlert("Cập thông tin điện thành công", "success");
                    return(RedirectToAction("Index", "QLD"));
                }
                else
                {
                    ModelState.AddModelError("", "Cập nhật thông tin điện không thành công");
                }
            }
            return(View());
        }