public ActionResult Competir(string disciplinaTitle) { if (Funcion.DisciplinaExists(disciplinaTitle) == false) { return(HttpNotFound()); } else { Disciplina bdDisciplina = db.Disciplina.Where(s => s.Nombre.Replace(" ", "-").ToLower() == disciplinaTitle).First(); Session["Disciplina"] = bdDisciplina.Nombre.Replace(" ", "-").ToLower(); Session["SeccionActiva"] = "Competir"; Session["ThisSecctionIsDashboard"] = "false"; Session["CurrentPlan"] = ""; Session["CurrentDiscipline"] = bdDisciplina.Nombre.Replace(" ", "-").ToLower(); string sRoot = Convert.ToString(Session["AppURL"]); string vLoaderImages = "<script>$(document).ready(function () { Competir.init({ images:[" + "'" + sRoot + "Content/img/comunidad-slmf/bg.jpg" + "'" + "," + "'" + sRoot + "Content/img/competir/mma-a-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/mma-b-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/mma-b-2.png" + "'" + "," + "'" + sRoot + "Content/img/competir/mma-c-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/mma-c-2.png" + "'" + "," + "'" + sRoot + "Content/img/competir/bbd-a-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/bbd-b-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/bbd-c-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/cft-a-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/cft-b-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/cft-c-1.png" + "'" + "," + "'" + sRoot + "Content/img/competir/background.jpg" + "'"; vLoaderImages += "], }); }); </script>"; ViewBag.Loader = vLoaderImages; return(View()); } }
public ActionResult Plan(string disciplinaTitle, string planName) { if (Funcion.DisciplinaExists(disciplinaTitle) == false) { return(HttpNotFound()); } if (Funcion.PlanExists(planName) == false) { return(HttpNotFound()); } else { int iPlanID = Funcion.GetPlanId(planName); Plan bdPlan = db.Plan.Find(iPlanID); string sRoot = Convert.ToString(Session["AppURL"]); Session["Disciplina"] = bdPlan.Disciplina.Nombre.Replace(" ", "-").ToLower(); Session["SeccionActiva"] = ""; Session["ThisSecctionIsDashboard"] = "true"; Session["CurrentPlan"] = bdPlan.Nombre.Replace(" ", "-").Replace("&", "and").ToLower(); Session["CurrentDiscipline"] = bdPlan.Disciplina.Nombre.Replace(" ", "-").ToLower(); string vLoaderImages = ""; ViewBag.Loader = vLoaderImages; return(View(bdPlan)); } }
public ActionResult Disciplina(string disciplinaTitle) { if (Funcion.DisciplinaExists(disciplinaTitle) == false) { return(HttpNotFound()); } else { Disciplina bdDisciplina = db.Disciplina.Where(s => s.Nombre.Replace(" ", "-").ToLower() == disciplinaTitle).First(); Session["Disciplina"] = bdDisciplina.Nombre.Replace(" ", "-").ToLower(); Session["SeccionActiva"] = ""; Session["ThisSecctionIsDashboard"] = "false"; Session["CurrentPlan"] = ""; Session["CurrentDiscipline"] = bdDisciplina.Nombre.Replace(" ", "-").ToLower(); string sRoot = Convert.ToString(Session["AppURL"]); string vLoaderImages = "<script>$(document).ready(function () { HomeDiscipline.init({ images:[" + "'" + sRoot + "Content/img/comunidad-slmf/bg.jpg" + "'" + ","; vLoaderImages += "'" + Convert.ToString(Session["ImageAssetsURL"]) + bdDisciplina.FileImage + "'"; vLoaderImages += "], }); }); </script>"; ViewBag.Loader = vLoaderImages; return(View(bdDisciplina)); } }