コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: BLLBase.cs プロジェクト: ufo20020427/FileUpload
 public BLLBase()
 {
     _dataBaseAccess = new DataBaseAccess(ServerConfig.Conn, ServerConfig.ProviderName);
 }
コード例 #6
0
ファイル: DCEngineBase.cs プロジェクト: ufo20020427/MvcEasyUI
 public DCEngineBase()
 {
     _dataBaseAccess = new DataBaseAccess(NMBConfig.Conn, NMBConfig.ProviderName);
 }
コード例 #7
0
ファイル: BLLBase.cs プロジェクト: ufo20020427/IISProcess
 public BLLBase()
 {
     _dataBaseAccess = new DataBaseAccess(DeveloperConfig.Conn, DeveloperConfig.ProviderName);
 }