private void AcceptRecruitedApplicant(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("Biztosan elfogadja a jelöltet? \n", "HR Cloud", MessageBoxButton.YesNo); switch (result) { case MessageBoxResult.Yes: ModelFreelancerApplicant applicant = (sender as Button).DataContext as ModelFreelancerApplicant; Applicant.AcceptRecruited(applicant); new Email().Send(applicant.email, new EmailTemplate().Kolcsonzott_Elfogado(applicant)); applicantListLoader(); break; case MessageBoxResult.No: break; } }