コード例 #1
0
        public ActionResult SaveSwimMeet(ViewSwimMeet viewSwimMeet)
        {
            try
            {
                //Save SwimMeet
                SwimMeet swimMeet = new SwimMeet();
                swimMeet.SwimMeetID = viewSwimMeet.SwimMeetID;
                swimMeet.SwimMeetTypeID = viewSwimMeet.SwimMeetTypeID;
                swimMeet.Description = viewSwimMeet.Description;
                swimMeet.StartDate = viewSwimMeet.StartDate;
                swimMeet.EndDate = viewSwimMeet.EndDate;
                swimMeet.LocationID = viewSwimMeet.LocationID;
                swimMeet.SeasonID = viewSwimMeet.SeasonID;
                swimMeet.SwimMeetID = BizMgr.SaveSwimMeet(swimMeet, base.CurrentUser.SystemUserID);

                //Delete existing SwimMeetTeams
                BizMgr.DeleteSwimMeetTeamsBySwimMeetID(swimMeet.SwimMeetID);

                //Save SwimMeetTeams
                SwimMeetTeam smt = null;
                foreach (int teamSeasonID in viewSwimMeet.TeamSeasonIDs)
                {
                    smt = new SwimMeetTeam();
                    smt.SwimMeetID = swimMeet.SwimMeetID;
                    smt.TeamSeasonID = teamSeasonID;
                    BizMgr.SaveSwimMeetTeam(smt);
                }
            }
            catch (Exception ex)
            {
                LogController.LogError(ex, LogEntryType.NormalError, "", "", "SystemUserID=" + base.CurrentUser.SystemUserID.ToString(), "");
            }
            return PartialView("_SwimMeets", GetSwimMeets(base.CurrentUser.SystemUserID));
        }
コード例 #2
0
 public int SaveSwimMeetTeam(SwimMeetTeam swimMeetTeam)
 {
     return Ctx.SwimMeetTeamManager.SwimMeetTeamSave(swimMeetTeam);
 }