private cliente CargarRelaciones(cliente unObjeto) { int ix; ix = ListaTipoPersona.FindIndex(x => x.id == unObjeto.fkpersona.idtipopersona); if (ix > -1) { unObjeto.fkpersona.fktipospersona = ListaTipoPersona[ix]; } ix = ListaTipoDocumento.FindIndex(x => x.id == unObjeto.fkpersona.idtipodocumento); if (ix > -1) { unObjeto.fkpersona.fktiposdocumento = ListaTipoDocumento[ix]; } ix = ListaGenero.FindIndex(x => x.id == unObjeto.fkpersona.idgenero); if (ix > -1) { unObjeto.fkpersona.fkgenero = ListaGenero[ix]; } ix = ListaEstadoCivil.FindIndex(x => x.id == unObjeto.idestadocivil); if (ix > -1) { unObjeto.fkestadoscivile = ListaEstadoCivil[ix]; } ix = ListaProfesion.FindIndex(x => x.id == unObjeto.idprofesion); if (ix > -1) { unObjeto.fkprofesione = ListaProfesion[ix]; } return(unObjeto); }
private persona CargarRelaciones(persona unObjeto) { int ix; ix = ListaTipoPersona.FindIndex(x => x.id == unObjeto.idtipopersona); if (ix > -1) { unObjeto.fktipospersona = ListaTipoPersona[ix]; } ix = ListaTipoDocumento.FindIndex(x => x.id == unObjeto.idtipodocumento); if (ix > -1) { unObjeto.fktiposdocumento = ListaTipoDocumento[ix]; } ix = ListaGenero.FindIndex(x => x.id == unObjeto.idgenero); if (ix > -1) { unObjeto.fkgenero = ListaGenero[ix]; } return(unObjeto); }