public static PERSONA_DTO MostrarID(int codPersona) { MARKET_DSTableAdapters.PERSONATableAdapter adto = new MARKET_DSTableAdapters.PERSONATableAdapter(); MARKET_DS.PERSONADataTable tabla = adto.MostrarPersonaID(codPersona); if (tabla.Rows.Count == 0) { return(null); } return(filaSDTO(tabla[0])); }
public static List <PERSONA_DTO> MostrarTodos() { List <PERSONA_DTO> mostrarpersona = new List <PERSONA_DTO>(); MARKET_DSTableAdapters.PERSONATableAdapter adto = new MARKET_DSTableAdapters.PERSONATableAdapter(); MARKET_DS.PERSONADataTable tabla = adto.MostrarPersona(); foreach (MARKET_DS.PERSONARow fila in tabla) { mostrarpersona.Add(filaSDTO(fila)); } return(mostrarpersona); }