public void RemoveKlantFromDag(int KlantID, int DagID) { string sql = @"DELETE FROM [dbo].[dagpersooninfo] WHERE [dagID] = @DagID AND [persoonInfoID] = @KlantID"; var dictionary = new Dictionary <string, object> { { "@KlantID", KlantID }, { "@DagID", DagID } }; var parameters = new DynamicParameters(dictionary); DataBaseAccess.DeleteData <DagDTO>(sql, parameters); }
public IEnumerable <KlantDTO> GetKlantById(int ID) { string sql = @"SELECT * FROM [dbo].[persooninfo] WHERE [persooninfo].persoonInfoID = @ID " ; var dictionary = new Dictionary <string, object> { { "@ID", ID } }; var parameters = new DynamicParameters(dictionary); return(DataBaseAccess.LoadData <KlantDTO>(sql, parameters)); }
public IEnumerable <KlantDTO> GetNotKlantenByDag(int dagID) { string sql = @" SELECT Klant.persoonInfoID, Klant.voornaam, Klant.tussenvoegsel, Klant.achternaam, Klant.telNr, Klant.postcode, Klant.straatNaam, Klant.huisNr, Klant.DOB, koppeltabel.aankomst, koppeltabel.vertrek FROM [dbo].[dag] LEFT JOIN [dbo].[dagpersooninfo] AS koppeltabel ON koppeltabel.dagID = [dag].dagid LEFT JOIN [dbo].[persooninfo] AS klant ON Klant.persoonInfoID = koppeltabel.persoonInfoID WHERE [dag].dagID = @dagID GROUP BY Klant.persoonInfoID, Klant.voornaam, Klant.tussenvoegsel, Klant.achternaam, Klant.telNr, Klant.postcode, Klant.straatNaam, Klant.huisNr, Klant.DOB, koppeltabel.aankomst, koppeltabel.vertrek "; var dictionary = new Dictionary <string, object> { { "@dagID", dagID } }; var parameters = new DynamicParameters(dictionary); return(DataBaseAccess.LoadData <KlantDTO>(sql, parameters)); }
public void DagDelete(int ID) { string sql = @"DELETE FROM [dbo].[dag] WHERE [dagID] = @ID"; var dictionary = new Dictionary <string, object> { { "@ID", ID } }; var parameters = new DynamicParameters(dictionary); DataBaseAccess.DeleteData <DagDTO>(sql, parameters); sql = @"DELETE FROM [dbo].[dagpersooninfo] WHERE [dagID] = @ID"; DataBaseAccess.DeleteData <DagDTO>(sql, parameters); }
public BLLBase() { _dataBaseAccess = new DataBaseAccess(ServerConfig.Conn, ServerConfig.ProviderName); }
public DCEngineBase() { _dataBaseAccess = new DataBaseAccess(NMBConfig.Conn, NMBConfig.ProviderName); }
public BLLBase() { _dataBaseAccess = new DataBaseAccess(DeveloperConfig.Conn, DeveloperConfig.ProviderName); }