public ActionResult Index(string slug, int?page)
        {
            string controllerAction;

            if (string.IsNullOrEmpty(slug))
            {
                controllerAction = "AllProduct";
            }
            else
            {
                var DetailCategory = Category.CheckSlug(slug, null);
                if (DetailCategory)
                {
                    controllerAction = "CategoryProduct";
                }
                else
                {
                    var Detail = Product.CheckSlug(slug, null);
                    if (Detail)
                    {
                        controllerAction = "DetailProduct";
                    }
                    else
                    {
                        controllerAction = "404";
                    }
                }
            }
            ViewBag.Action = controllerAction;
            return(View());
        }
 public JsonResult IsLinksExists(string slug, long?Id)
 {
     return(Json(!Dao.CheckSlug(slug, Id), JsonRequestBehavior.AllowGet));
 }