コード例 #1
0
		public void SubmitRegistration (AnnualRegistration registration, User user) 
		{
			registration.User = user;
			// get current term
			registration.RegistrationTerm = session.Query<RegistrationTerm>()
					.Single(t => t.Current);
			
			foreach (var skater in registration.Skaters) {
				var sessions = skater.Sessions;
				skater.Sessions = new List<SkatingSession>();
				skater.Registration = registration;
				
				foreach (var skatingSession in sessions) {
					skater.Sessions.Add (session.Get<SkatingSession>(skatingSession.ID));
				}
			}
			
			session.Save(registration);
			foreach (var skater in registration.Skaters) {
				session.Save (skater);
			}
			GenerateInvoice(registration);
		}
コード例 #2
0
		public ActionResult Create()
		{
			var user = new YaleFigureSkatingClub.Entities.User();
			return View (user);	
		}