Example #1
0
        public ActionResult Create(TaiKhoan acc)
        {
            if (ModelState.IsValid)
            {
                var dao = new TaiKhoanDao();

                var res = dao.Insert(acc);
                if (res != null)
                {
                    return(RedirectToAction("Index", "Account"));
                }
                else
                {
                    ModelState.AddModelError("", "Thêm thành công");
                }
            }
            return(View("Index"));
        }
 public int Insert(TaiKhoanDto obj)
 {
     return(dao.Insert(obj));
 }