private void ButtonEmail_Click(object sender, RoutedEventArgs e) { Student studentMail = studentGrd.SelectedItem as Student; if (studentMail == null) { return; } EmailDialog emailDialog = new EmailDialog(_db, studentMail); if (emailDialog.ShowDialog() == true) { MessageBox.Show("Notificação enviado com sucesso", "Sucesso!"); } }
private void ButtonEmail_Click(object sender, RoutedEventArgs e) { Employee employeeEmail = employeesGrd.SelectedItem as Employee; if (employeeEmail == null) { return; } EmailDialog emailDialog = new EmailDialog(_db, employeeEmail); if (emailDialog.ShowDialog() == true) { MessageBox.Show("Notificação enviado com sucesso", "Sucesso!"); } }