private void Formatura_Click(object sender, RoutedEventArgs e) { CadastroView A = new CadastroView(); A.IniciaVariavelNovo(); A.IniciaCadastro(); A.Show(); }
private void btnEditar_Click(object sender, RoutedEventArgs e) { //int _index = dgvCadastro.Items.IndexOf(dgvCadastro.CurrentItem); //DataRowView row = (DataRowView)dgvCadastro.SelectedItems[_index]; DataRowView row = dgvCadastro.SelectedItem as DataRowView; if (row != null) { var A = new CadastroView(); A.IniciaVariavelEdit(Convert.ToInt32(row["ativo"]), Convert.ToInt32(row["id"]), Convert.ToString(row["nome"]), Convert.ToString(row["cpfcnpj"]), Convert.ToString(row["email"]), Convert.ToString(row["telefone"]), Convert.ToString(row["localgrau"]), Convert.ToString(row["aluguel"]), Convert.ToString(row["convites"]), Convert.ToString(row["floricultura"]), Convert.ToString(row["profhomenageados"]), Convert.ToString(row["localfesta"]), Convert.ToString(row["observacoes"]), Convert.ToString(row["valorfinal"]), Convert.ToString(row["valoraluno40"]), Convert.ToString(row["valoraluno50"]), Convert.ToString(row["valoraluno60"]), Convert.ToString(row["organizadora"]), Convert.ToString(row["aluguelsalaofesta"])); A.IniciaCadastro(); A.Show(); } }