public JsonResult GetAllData(int rows, int page)
        {
            DanTocServices service = new DanTocServices();
            List<DanTocEntity> dantocs = new List<DanTocEntity>();

            try
            {
                dantocs = service.GetAll();
                return Json(PaginationHelper<DanTocEntity>.Execute(dantocs, page, rows), JsonRequestBehavior.AllowGet);
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.ToString());
            }

            return Json(null);
        }
        public JsonResult GetAllDataWithoutPagination()
        {
            DanTocServices service = new DanTocServices();
            List<DanTocEntity> listDantoc = new List<DanTocEntity>();
            string result = null;
            try
            {
                listDantoc = service.GetAll();
                result = JsonConvert.SerializeObject(listDantoc);
                return Json(RenderResult.RequestCompleted(ViewData, result), JsonRequestBehavior.AllowGet);
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.ToString());
            }

            return Json(null);
        }
        // GET: DanToc
        public ActionResult Index()
        {
            DanTocServices service = new DanTocServices();
            List<DanTocEntity> listDantoc = new List<DanTocEntity>();
            string result = null;

            try
            {
                listDantoc = service.GetAll();
                result = JsonConvert.SerializeObject(listDantoc);
                RenderResult.RequestCompleted(ViewData, result);
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.ToString());
                RenderResult.RequestError(ViewData, "Lỗi hệ thống");
            }

            return View();
        }
        public JsonResult GetMaQuyDinh()
        {
            DanTocServices service = new DanTocServices();

            try
            {
                return Json(RenderResult.RequestCompleted(ViewData, GenKey.GenIncrementKey("DT", 3, service.GetAll().Count)), JsonRequestBehavior.AllowGet);
            }
            catch (Exception e)
            {
                System.Console.WriteLine(e.ToString());
                return Json(RenderResult.RequestError(ViewData, "Lỗi xảy ra"), JsonRequestBehavior.AllowGet);
            }
        }