コード例 #1
0
        public ActionResult Paricipate1(int IdEnfant, int IdFormation)
        {
            Formation f = MyFormationService.GetById((int)IdFormation);

            f.Reserved++;
            Participation p = new Participation()
            {
                EnfantId    = IdEnfant,
                FormationID = IdFormation
            };

            MyFormationService.Update(f);
            MyFormationService.Commit();
            MyParticipationService.Add(p);
            MyParticipationService.Commit();

            return(RedirectToAction("Paricipate", new { IdFormation = IdFormation }));
        }