Ejemplo n.º 1
0
        private void RegistrationOnMarathon(object sender, RoutedEventArgs e)
        {
            RegConfirmation confirmation = new RegConfirmation();

            confirmation.Show();
            this.Close();
        }
Ejemplo n.º 2
0
        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();
        }