public ActionResult Edit(int id)
        {
            var dao     = new KyGhiDao();
            var content = dao.GetByID(id);



            return(View(content));
        }
        // GET: Admin/KyGhi
        public ActionResult Index(int page = 1, int pageSize = 10)
        {
            var dao   = new KyGhiDao();
            var model = dao.ListAllPaging(page, pageSize);



            return(View(model));
        }
        public ActionResult Edit(kyghi collection, int id)
        {
            if (ModelState.IsValid)
            {
                var dao = new KyGhiDao();



                var result = dao.Update(collection, id);
                if (result)
                {
                    return(RedirectToAction("Index", "KyGhi"));
                }
                else
                {
                    ModelState.AddModelError("", "Cập nhật không thành công");
                }
            }
            return(View("Index"));
        }
        public ActionResult Create(kyghi collection)
        {
            if (ModelState.IsValid)
            {
                var dao = new KyGhiDao();



                long id = dao.Insert(collection);
                if (id > 0)
                {
                    return(RedirectToAction("Index", "KyGhi"));
                }
                else
                {
                    ModelState.AddModelError("", "Thêm Kì Ghi không thành công");
                }
            }
            return(View("Index"));
        }