private void button1_Click(object sender, EventArgs e) { Image Foto; if(nombre.Text.Length==0 || apellido.Text.Length==0 || ced.Text.Trim().Length<16 || dir.Text.Length==0){ MessageBox.Show("Complete la información del tutor antes de regitrar","Información"); }else{ string query = "Select *From Candidatos where nombre='" + nombreNin.Text + "' AND apellido= '"+apellidoNin.Text+"' AND dir='"+dirNin.Text +"' AND fecha_nac= '"+fechaNac.Text+"' AND Tipo='Niño'"; mc = new MetodosComunes(); mc.GuardarTutor(nombre.Text, apellido.Text, ced.Text, dir.Text, tel.Text, query); this.Dispose(); Candidato cand = new Candidato(); Camara cam = new Camara("", "", "", "", "", "", "", 0,"", "", "", "", "",cand); Foto = cam.Captura.Image; Candidato c = new Candidato(Foto, cam, "", "", "", "", "", "","", -1, "", "","","", ""); c.MdiParent = this.MdiParent; c.Show(); } }
public void SenderImage() { Candidato c = new Candidato(Captura.Image, this, Name, Apellido, Fecha_nac, Tel, Dir, Tipo, Ced, CbxIndex, Exp, Sexo, Proced, Cpe, Cjs ); c.pictureBox1.Refresh(); c.MdiParent = this.MdiParent; c.Show(); this.Dispose(); }
private void registrarNuevoToolStripMenuItem_Click(object sender, EventArgs e) { Image Foto; Candidato cand = new Candidato(); Camara cam = new Camara("", "" , "", "", "", "", "", 0, "", "", "", "", "", cand); Foto = cam.Captura.Image; Candidato c = new Candidato(Foto, cam, "", "", "", "", "", "", "", -1, "radio4", "", "", "", ""); c.MdiParent = this; c.Show(); }