|
Ok,在結(jié)束整個“我的方案”之前,作者最后“獻上”一段代
碼(是不是有點暈了?),希望能為您的DAF之旅劃上一個圓滿的句號J
代碼17:通過DAF更新數(shù)據(jù)
// 創(chuàng)建Customer數(shù)據(jù)訪問對象
CustomerDaf daf = new CustomerDaf();
// 創(chuàng)建Customer數(shù)據(jù)實體對象,設(shè)置對象字段值
Customer cust_1 = new Customer();
cust_1.Id = "ALFKI";
cust_1.Phone = "12345678";
// 根據(jù)Customer數(shù)據(jù)實體對象更新數(shù)據(jù)存儲
daf.UpdateCustomer(cust_1);
// 創(chuàng)建Customer數(shù)據(jù)實體對象,該對象內(nèi)含一個數(shù)據(jù)列表
Customer cust_2 = new Customer(new ArrayList());
// 聲明另一個Customer數(shù)據(jù)實體對象,該對象用于將數(shù)據(jù)插入
// 上述Customer數(shù)據(jù)實體對象的列表中
Customer cust_obj = null;
// 創(chuàng)建Customer數(shù)據(jù)實體對象,設(shè)置對象字段值并將其插入cust_2實體對象中
cust_obj = new Customer();
cust_obj.Id = "ANATR";
cust_obj.Name = "Willian.Zhang";
cust_2.Add(cust_obj);
// 創(chuàng)建Customer數(shù)據(jù)實體對象,設(shè)置對象字段值并將其插入cust_2實體對象中
cust_obj = new Customer();
cust_obj.Id = "ANTON";
cust_obj.Name = "Xuefeng.Zhang";
cust_2.Add(cust_obj);
// 根據(jù)Customer數(shù)據(jù)實體對象中的數(shù)據(jù)列表更新數(shù)據(jù)存儲
daf.UpdateCustomers(cust_2);
下一段:http://www.csdn.net/develop/Read_Article.asp?id=27567 對該文的評論 szlen ( 2004-05-14) 陽光商務(wù)短信群發(fā)王源碼版(iSBSMS) 下載地址:http://www.szlon.com 軟件架構(gòu):三層結(jié)構(gòu)(表現(xiàn)層+商業(yè)邏輯層+數(shù)據(jù)處理層) 開發(fā)語言:C# 數(shù) 據(jù) 庫:Access2000 程序類別:Windows應(yīng)用程序 源碼價格:680/600元(會員價)
欲購源代碼請直接登陸我們的網(wǎng)站下單:http://www.szlen.com
軟件運行環(huán)境: 1.本軟件使用微軟最新的C#語言開發(fā),開發(fā)工具包括:Microsoft Visual Studio .NET 2003,Macromedia Dreamweaver MX,F(xiàn)ireworks 4 2.客戶端需要安裝.NET Framework SDK 1.1 版. 3.支持等操作系統(tǒng):Windows 98, Windows ME, Windows NT,Windows 2000, Windows Server 2003, Windows XP ---------------------------------------
軟件名稱:陽光商務(wù)郵件搜索王源碼版(iSBES) 下載地址:http://www.szlon.com 軟件架構(gòu):三層結(jié)構(gòu)(表現(xiàn)層+商業(yè)邏輯層+數(shù)據(jù)處理層) 開發(fā)語言:C# 數(shù) 據(jù) 庫:Access2000 程序類別:Windows應(yīng)用程序 源碼價格:580/500元(會員價)
欲購源代碼請直接登陸我們的網(wǎng)站下單:http://www.szlen.com
軟件運行環(huán)境: 1.本軟件使用微軟最新的C#語言開發(fā),開發(fā)工具包括:Microsoft Visual Studio .NET 2003,Macromedia Dreamweaver MX,F(xiàn)ireworks 4 2.客戶端需要安裝.NET Framework SDK 1.1 版. 3.支持等操作系統(tǒng):Windows 98, Windows ME, Windows NT,Windows 2000, Windows Server 2003, Windows XP --------------------------------------- 技術(shù)支持 QQ:17506793 MSN:sun188com@hotmail.com 網(wǎng)站地址:http://www.szlen.com 聯(lián) 系 人:陳先生 聯(lián)系電話:0755-26742591 傳真號碼:0755-26742783 電子郵件:sun188com@hotmail.com 軟件演示:http://www.szlon.com ---------------------------------------
|