private void RegistrationOnMarathon(object sender, RoutedEventArgs e) { RegConfirmation confirmation = new RegConfirmation(); confirmation.Show(); this.Close(); }
private void RegistrationOnMarathon(object sender, RoutedEventArgs e) { context.Registration.Add(new Registration { RunnerId = UserClass.UserId, RegistrationDateTime = DateTime.Now, RaceKitOptionId = ZnachenieRaceKitOption, RegistrationStatusId = 4, Cost = 0, CharityId = context.Charity.Where(i => i.CharityName == CharityOrg.Text).Select(i => i.CharityId).First(), SponsorshipTarget = Convert.ToDecimal(SummaAll) }); context.SaveChanges(); RegConfirmation confirmation = new RegConfirmation(); confirmation.Show(); this.Close(); }