public CtfBautismo(string cedula) { InitializeComponent(); frmMenuCertificado frmMenu = new frmMenuCertificado(); Autocompletado BusqBaut = new Autocompletado(); DataTable dt = new DataTable(); try { string a, fecha; a = cedula; // a = "0451322251"; dt = BusqBaut.BuscarBauti(a); tbkNomBauti.Text = dt.Rows[0]["nombre"].ToString(); tbkApeBauti.Text = dt.Rows[0]["apellidos"].ToString(); tbkNomParroco.Text = "Romel"; tbkApeParroco.Text = "Vivanco"; fecha = dt.Rows[0]["fechafin"].ToString(); tbkAno.Text = fecha.Substring(6, 4); tbkMes.Text = fecha.Substring(3, 2); tbkDia.Text = fecha.Substring(0, 2); } catch (System.IndexOutOfRangeException) { MessageBox.Show("No se ha encontrado el registro"); frmMenu.txtCedulaF.Text = ""; } }
private void Certificados_Click(object sender, RoutedEventArgs e) { frmMenuCertificado certificado = new frmMenuCertificado(); this.Visibility = Visibility.Hidden; certificado.ShowDialog(); this.Close(); }