public ActionResult SupprimerSetDouble(int idS, int idM) { DCSet dc = new DCSet(); dc.Delete(idS); return(Redirect("~/Match/InfoMatchDouble/" + idM)); }
public ActionResult AjoutSet(int position, int point1, int point2) { DCSet dc = new DCSet(); if (dc.findSamePos(position, (int)Session["idM"])) { return(Redirect("/Match/AjoutSet?idM=" + (int)Session["idM"] + "&cpt1=" + (int)Session["cpt1"] + "&cpt2=" + (int)Session["cpt2"] + "&score1=" + (int)Session["score1"] + "&score2=" + (int)Session["score1"] + "&j1=" + HttpUtility.HtmlEncode(Session["j1"]) + "&j2=" + HttpUtility.HtmlEncode(Session["j2"]) + "&error=Il existe déja un set sur cette position")); } if (point1 > point2 && (int)Session["cpt1"] < (int)Session["score1"]) { dc.Insert((int)Session["idM"], point1, point2, position); return(Redirect("/Match/InfoMatch/" + Session["idM"])); } else if (point2 > point1 && (int)Session["cpt2"] < (int)Session["score2"]) { dc.Insert((int)Session["idM"], point1, point2, position); return(Redirect("/Match/InfoMatch/" + Session["idM"])); } else { return(Redirect("~/Match/InfoMatch/" + Session["idM"] + "?error=Erreur le gagnant du match ne correspond pas au nombre de set gagné")); } }
public List <Set> GetList(int idR) { DCSet dc = new DCSet(); return(dc.findAll(idR)); }