private void button1_Click(object sender, EventArgs e)
 {
     MetodosCandidato g = new MetodosCandidato();
     g.ActualizarCand(ID, textBox1.Text, textBox2.Text, textBox5.Text, maskedTextBox1.Text, comboBox1.SelectedItem.ToString(), pictureBox1);
     mc = new MetodosComunes();
     mc.DetallesCandidato(ID, textBox1, textBox2, textBox3, textBox4, textBox5, maskedTextBox1, maskedTextBox2, pictureBox1);
 }
        private void DetallesCandidato_Load(object sender, EventArgs e)
        {
            mc = new MetodosComunes();
            textBox6.Text = ID.ToString();
            mc.DetallesCandidato(ID, textBox1, textBox2, textBox3, textBox4, textBox5, maskedTextBox1, maskedTextBox2, pictureBox1);
            textBox6.Enabled = false;
            textBox1.Enabled = false;
            textBox2.Enabled = false;
            textBox3.Enabled = false;
            textBox4.Enabled = false;
            textBox5.Enabled = false;
            maskedTextBox1.Enabled = false;
            textBox7.Enabled = false;
            maskedTextBox2.Enabled = false;

            String cad = textBox4.Text.Substring(6,4);
            String an = DateTime.Now.ToString();
            String anAct = an.Substring(6,4);
            int nac = Convert.ToInt32(cad);
            int a = Convert.ToInt32(anAct);
            int edad = a - nac;

            textBox7.Text = ""+ edad+ " años";
        }