public ActionResult Delete(int id=0)
 {
     //check
     if (!this._nhanvien_permission.Contains("phanhoi_delete"))
     {
         return this._fail_permission("phanhoi_delete");
     }
     PhanHoiController ctr = new PhanHoiController();
     if (!ctr.is_exist(id))
     {
         return RedirectToAction("Index", "AdminPhanHois");
     }
     //delete
     ctr.delete(id);
     return RedirectToAction("Index","AdminPhanHois");
 }
        public ActionResult Index(int page=1, int phanhoi_id=0)
        {
            //check
            if (!this._nhanvien_permission.Contains("phanhoi_view"))
            {
                return this._fail_permission("phanhoi_view");
            }
            PhanHoiController ctr = new PhanHoiController();
            //pagination
                int max_item_per_page = TextLibrary.ToInt(this.timkiem_phanhoi["max_item_per_page"]);
                Pagination pg = new Pagination();
                pg.set_current_page(page);
                pg.set_max_item_per_page(max_item_per_page);
                pg.set_total_item(
                    ctr.timkiem_count(
                        timkiem_phanhoi["id"],
                        timkiem_phanhoi["tieude"],
                        timkiem_phanhoi["noidung"],
                        timkiem_phanhoi["nguoigui_ten"],
                        timkiem_phanhoi["nguoigui_email"]
                        )
                    );
                pg.update();
            //Chọn danh sách để hiển thị theo cookies tìm kiếm

            ViewBag.PhanHoi_List = ctr.timkiem(
                timkiem_phanhoi["id"],
                timkiem_phanhoi["tieude"],
                timkiem_phanhoi["noidung"],
                timkiem_phanhoi["nguoigui_ten"],
                timkiem_phanhoi["nguoigui_email"],
                "", "id", true, pg.start_point, pg.max_item_per_page
                );
            //set search cookies
            ViewBag.timkiem_phanhoi = this.timkiem_phanhoi;
            ViewBag.phanhoi  = ctr.is_exist(phanhoi_id) ? ctr.get_by_id(phanhoi_id) : new PhanHoi();

            ViewBag.Title += " - Quản lý";
            ViewBag.State = TempData["state"] == null ? new List<string>() : (List<string>)TempData["state"];
            ViewBag.pagination = pg;
            return View();
        }