private void button_fecha_Click(object sender, EventArgs e) { var seleccionarFecha = new SelecionarFecha(); seleccionarFecha.ShowDialog(); var fecha = seleccionarFecha.fecha; this.textBox_fecha.Text = fecha.ToString("yyyy.MM.dd"); }
private void btn_fecha_Click(object sender, EventArgs e) { var seleccionarFecha = new SelecionarFecha(); seleccionarFecha.fecha = DateTime.Parse(this.txtFec_Nac.Text); seleccionarFecha.ShowDialog(); this.afiliado.fecha_nac = seleccionarFecha.fecha; this.afiliado_principal.fecha_nac = seleccionarFecha.fecha; this.txtFec_Nac.Text = afiliado_principal.fecha_nac.ToShortDateString(); }