實戰(zhàn) .Net 數(shù)據(jù)訪問層 - 22
2024-07-10 13:03:19
供稿:網(wǎng)友
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,fireworks 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,fireworks 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:[email protected]
網(wǎng)站地址:http://www.szlen.com
聯(lián) 系 人:陳先生
聯(lián)系電話:0755-26742591
傳真號碼:0755-26742783
電子郵件:[email protected]
軟件演示:http://www.szlon.com
---------------------------------------
本文來源于網(wǎng)頁設(shè)計愛好者web開發(fā)社區(qū)http://www.html.org.cn收集整理,歡迎訪問。