public JsonResult GetAllData(int rows, int page)
        {
            TonGiaoServices service = new TonGiaoServices();
            List<TonGiaoEntity> donvis = new List<TonGiaoEntity>();

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

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

            return Json(null);
        }
        // GET: TonGiao
        public ActionResult Index()
        {
            TonGiaoServices service = new TonGiaoServices();
            List<TonGiaoEntity> listTonGiao = new List<TonGiaoEntity>();
            string result = null;

            try
            {
                listTonGiao = service.GetAll();
                result = JsonConvert.SerializeObject(listTonGiao);
                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()
        {
            TonGiaoServices service = new TonGiaoServices();

            try
            {
                return Json(RenderResult.RequestCompleted(ViewData, GenKey.GenIncrementKey("TG", 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);
            }
        }