public BorrarCliente(DatosCliente dc) { this.datos = dc; InitializeComponent(); int aux = datos.esErroneo(datos.idPersona); if (aux == 1 || aux == 2) { //MailErroneo me = new MailErroneo(datos,2); //me.Show(); this.Hide(); ErrorPasaporteErroneo epe = new ErrorPasaporteErroneo(datos.nrodoc, datos.mail, this); epe.Show(); } /*else if (aux == 2) * { * //error de id y tipo repetidos * PasaporteErroneo pe = new PasaporteErroneo(datos,2); * pe.Show(); * }*/ else if (aux == 0) { //todo ok this.Show(); } llenarCampos(); }
public ModificarCliente(DatosCliente datos) { this.idPersona = datos.idPersona; this.nombre = datos.nombre; this.apellido = datos.apellido; this.tipodoc = datos.tipodoc; this.nrodoc = datos.nrodoc; this.mail = datos.mail; this.fechanac = datos.fechanac; this.nacionalidad = datos.nacionalidad; this.dircalle = datos.dircalle; this.dirnrocalle = datos.dirnrocalle; this.pais = datos.pais; this.dirpiso = datos.dirpiso; this.dirdepto = datos.dirdepto; this.dirloc = datos.dirloc; this.habilitado = datos.habilitado; this.telefono = datos.telefono; int aux = datos.esErroneo(idPersona); InitializeComponent(); cargarPaises(); cargarTipoID(); if (aux == 1) { this.Hide(); //MailErroneo me = new MailErroneo(datos,1); ErrorPasaporteErroneo epe = new ErrorPasaporteErroneo(nrodoc, mail, this); epe.Show(); //me.Show(); } else if (aux == 2) { //error de id y tipo repetidos this.Hide(); //PasaporteErroneo pe = new PasaporteErroneo(datos,1); //1 x modificacion. //pe.Show(); ErrorPasaporteErroneo epe = new ErrorPasaporteErroneo(nrodoc, mail, this); epe.Show(); } else if (aux == 0) { //todo ok this.Show(); llenarCampos(); } llenarCampos(); dateTimePicker1.Value = LoginData.SystemDate; }