public static Grupo InsertWithReturn(string nombre, string idEvento) { GrupoDSTableAdapters.tbl_grupoTableAdapter adapter = new GrupoDSTableAdapters.tbl_grupoTableAdapter(); GrupoDS.tbl_grupoDataTable table = adapter.InsertWithReturn(nombre, Convert.ToInt32(idEvento), 0); if (table.Rows.Count == 0) { return(null); } return(RowToDto(table[0])); }
public static Grupo SelectById(int id) { GrupoDSTableAdapters.tbl_grupoTableAdapter adapter = new GrupoDSTableAdapters.tbl_grupoTableAdapter(); GrupoDS.tbl_grupoDataTable table = adapter.SelectById(id); if (table.Rows.Count == 0) { return(null); } return(RowToDto(table[0])); }
public static List <Grupo> SelectByEvento(int id) { GrupoDSTableAdapters.tbl_grupoTableAdapter adapter = new GrupoDSTableAdapters.tbl_grupoTableAdapter(); GrupoDS.tbl_grupoDataTable table = adapter.SelectByEvento(id); List <Grupo> listGrupo = new List <Grupo>(); foreach (GrupoDS.tbl_grupoRow row in table) { listGrupo.Add(RowToDto(row)); } return(listGrupo); }