public DataTable lista(char validita) { string strValidita = "('')"; tabellaOfferte.Clear(); if (validita == 'A') { strValidita = "('', 'A')"; } sql = "SELECT * " + "FROM Offerte " + "WHERE ValOfferta IN " + strValidita; try { tabellaOfferte = sqlOfferta.eseguiQuery(sql, CommandType.Text); } catch (Exception e) { MessageBox.Show("Attenzione!! [lista]" + e.Message); } return(tabellaOfferte); }
public DataTable hannoScritto(int codLibro) { string strValidita = "('')"; tabellaAutori.Clear(); sql = "SELECT Autori.IdAutore, Autori.CognAutore, Autori.NomeAutore " + "FROM Autori " + "INNER JOIN Scrive ON (IdLibScrive= " + codLibro + " AND IdAutore=IdAutScrive and ValScrive IN " + strValidita + ")"; try { tabellaAutori = sqlAutori.eseguiQuery(sql, CommandType.Text); } catch (Exception e) { MessageBox.Show("Attenzione!! [hannoScritto]" + e.Message); } return(tabellaAutori); }