private void EditaPastor_Click(object sender, RoutedEventArgs e) { Modelos.Pastores pastorSelecionado = (Modelos.Pastores)GridListPastores.SelectedItem; PastorEdit newEdit = new PastorEdit(); Controllers.PastorController pc = new Controllers.PastorController(); newEdit.boxID.Text = pastorSelecionado.Id.ToString(); newEdit.boxNome.Text = pastorSelecionado.Nome; newEdit.boxCpf.Text = pastorSelecionado.PastorCPF; newEdit.sexo = pastorSelecionado.PastorSexo; newEdit.DataNascimento.Text = pastorSelecionado.DataNascPastor.ToString(); newEdit.boxEndPastor.Text = pastorSelecionado.EnderecoPastor; newEdit.boxNum.Text = pastorSelecionado.NumeroPastor.ToString(); newEdit.boxCEP.Text = pastorSelecionado.CEPPastor; newEdit.BoxBairro.Text = pastorSelecionado.BairroPastor; newEdit.boxCidade.Text = pastorSelecionado.CidadePastor; newEdit.BoxUF.Text = pastorSelecionado.UFPastor; newEdit.ShowDialog(); this.Close(); }
private void btnPastorEdit_Click(object sender, RoutedEventArgs e) { PastorEdit EditandoPastor = new PastorEdit(); EditandoPastor.ShowDialog(); }