賓館管理系統(tǒng)報(bào)告書_第1頁
賓館管理系統(tǒng)報(bào)告書_第2頁
賓館管理系統(tǒng)報(bào)告書_第3頁
賓館管理系統(tǒng)報(bào)告書_第4頁
賓館管理系統(tǒng)報(bào)告書_第5頁
已閱讀5頁,還剩26頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、河南城建學(xué)院C#課程設(shè)計(jì)報(bào)告書專業(yè):信息管理與信息系統(tǒng)課程設(shè)計(jì)名稱:可視化編程技術(shù)課程設(shè)計(jì)題目:賓館管理系統(tǒng)班級(jí):0634081班設(shè)計(jì)者:063408139_蘇朝鍇同組人員:063408138_任建超 063408105_孔煥穎063408106_李文艷指導(dǎo)老師:張延紅 趙軍民 郭猛完成時(shí)間:2010年1月6日前言2一、需求分析:3(一)系統(tǒng)主要功能:3(二)關(guān)系模式3(三)功能模塊4(四)數(shù)據(jù)庫需求分析4二、概要設(shè)計(jì)5(一)數(shù)據(jù)庫概念結(jié)構(gòu)設(shè)計(jì)51、用戶管理E-R圖62.、顧客信息實(shí)體E-R圖:63、房間信息實(shí)體E-R圖:64、顧客入住信息實(shí)體E-R圖:75、房間類型實(shí)體E-R圖:76.、整體

2、結(jié)構(gòu)E-R圖:8(二)數(shù)據(jù)表設(shè)計(jì)9三、詳細(xì)設(shè)計(jì)11(一)系統(tǒng)詳細(xì)設(shè)計(jì)目標(biāo)規(guī)劃11(二)系統(tǒng)詳細(xì)設(shè)計(jì)任務(wù)11(三)系統(tǒng)物理配置方案設(shè)計(jì)11(四 )系統(tǒng)輸出設(shè)計(jì)12(五)系統(tǒng)輸入設(shè)計(jì)12(六)界面設(shè)計(jì)121、用戶登錄界面設(shè)計(jì)122、超級(jí)用戶登錄界面133、用戶管理界面設(shè)計(jì)134、用戶添加界面設(shè)計(jì)145、用戶修改界面146、主界面157、房間類型管理界面158、客房查詢界面169、客房信息管理界面1610、客戶記錄查詢界面1711、客戶結(jié)算界面1712、客戶入住界面17四、代碼設(shè)計(jì)181、用戶表示層(room窗體)182、業(yè)務(wù)邏輯層203、model層214、數(shù)據(jù)訪問層235、公用類層24(1)da

3、ta.cs24(2)d_Bind.cs28五、參考文獻(xiàn)29六、心得29前言隨著計(jì)算機(jī)技術(shù)的飛速發(fā)展,信息時(shí)代的到來,信息改變了我們這個(gè)社會(huì)。各類行業(yè)在日常經(jīng)營管理各個(gè)方面也在悄悄地走向規(guī)范化和網(wǎng)絡(luò)化。賓館管理的信息化程度體現(xiàn)在將計(jì)算機(jī)及網(wǎng)絡(luò)與信息技術(shù)應(yīng)用于經(jīng)營與管理,以現(xiàn)代化工具代替?zhèn)鹘y(tǒng)手工作業(yè)。無疑,使用網(wǎng)絡(luò)信息化管理使賓館管理更先進(jìn)、更高效、更科學(xué),信息交流更迅速。賓館管理系統(tǒng)是典型的信息管理系統(tǒng)的一部份,而且是必不可少的一部份。其開發(fā)主要包括后臺(tái)數(shù)據(jù)庫的建立和維護(hù)以及前端應(yīng)用程序的開發(fā)兩個(gè)方面。對(duì)于前者要求建立起簡潔且資料一致性和完整性強(qiáng)、資料安全性好的數(shù)據(jù)庫。而對(duì)于后者則要求應(yīng)用程序功

4、能完備,易使用等特點(diǎn)。賓館管理系統(tǒng)是賓館經(jīng)營管理中不可缺少的部分,它的內(nèi)容對(duì)于經(jīng)營的決策者和管理者來說都至關(guān)重要,所以賓館管理系統(tǒng)、信息管理系統(tǒng)應(yīng)該能夠?yàn)橛脩籼峁┏渥愕男畔⒑涂旖莸牟樵兪侄?。但一直以來人們使用傳統(tǒng)人工的方式管理文件檔案,這種管理方式存在著許多弊端,如:效率低、保密性差,容易出現(xiàn)差錯(cuò)等,且對(duì)于查詢空房間及已定房間等極為不方便。在當(dāng)今時(shí)代,這些完全可以改用計(jì)算機(jī)來代替人的手工操作。作為計(jì)算機(jī)及網(wǎng)絡(luò)應(yīng)用的一部分,使用計(jì)算機(jī)對(duì)客房信息進(jìn)行管理,具有手工管理所無法比擬的優(yōu)點(diǎn)。例如:檢索迅速、查找方便、可靠性高、存儲(chǔ)量大、保密性好、壽命長、成本低等。這些優(yōu)點(diǎn)能夠極大地提高賓館管理的效率,也

5、是企業(yè)的科學(xué)化、正規(guī)化管理,與世界接軌的重要條件。且辦事效率也是決定收入的一個(gè)關(guān)鍵因素。因此,我決定選擇賓館管理系統(tǒng)作為本人的畢業(yè)設(shè)計(jì),力求開發(fā)出一套界面友好,功能強(qiáng)大,使用簡單的適用于各大、中、小規(guī)模的賓館的管理系統(tǒng)。同時(shí)也是一款完全適合賓館或旅館管理傻瓜式日常業(yè)務(wù)管理的軟件。一、需求分析:(一)系統(tǒng)主要功能:1、 客房類型管理:提供有關(guān)客房類型狀況的規(guī)范:有客房類型名、房間面積、額定床數(shù)、額定人數(shù)、住房單價(jià)、是否有空調(diào)、電視機(jī)、電話以及單獨(dú)衛(wèi)生間等,并可進(jìn)行添加、修改、刪除、查詢等操作。2、 客房信息管理:用來管理各個(gè)客房的信息和狀況,并在客戶入住之前根據(jù)客戶的要求提供給客戶的客房的情況,

6、可進(jìn)行添加、修改、刪除、查詢等操作。3、 客戶入住信息管理:記錄用戶入住的信息,根據(jù)客戶的身份證號(hào)碼來顯示客戶的 入住記錄,以便用戶管理和結(jié)算,可進(jìn)行添加、修改、刪除、查詢等操作。4、 結(jié)算信息記錄管理:對(duì)入住用戶的入住信息情況的管理,客戶付清住宿費(fèi)用并注銷房間??蛇M(jìn)行添加、修改、刪除、查詢等操作。5、 用戶管理:對(duì)系統(tǒng)使用人員進(jìn)行管理,只有符合要求的人才能進(jìn)行一些相關(guān)操作,并可進(jìn)行添加、修改、刪除等操作。(二)關(guān)系模式1、RoomType信息:(RoomTypeName、BedNum、PeopleNum、Price、 Toilet、AirCondition)2、 Room記錄:(RoomID

7、、RoomTypeName、RoomPostion、PeopleNum、BedNum、FactPeopleNum)3、 Client信息:(ClientID、ClientName、Sex 、NativePlace、IdentifyID)4、 ClientRecord信息:( ClientID、ClientName、RoomID、 InDate、CheckDate、TotalMone、Check)5、 User信息:(UserID、Username、Password、UserRole)(三)功能模塊修改住宿房間系統(tǒng)管理房間類型管理客房信息管理客戶記錄查詢用戶管理添加住宿房間刪除住宿房間添加房間類

8、型修改房間類型刪除房間類型客戶結(jié)算管理預(yù)定房間退訂房間客房查詢添加用戶修改用戶刪除用戶(四)數(shù)據(jù)庫需求分析1、酒店管理系統(tǒng)需要提供信息的查詢、保存、更新以及刪除等功能,這就要求數(shù)據(jù)庫能充分滿足各種信息的輸入輸出。通過對(duì)上述系統(tǒng)功能的分析。針對(duì)酒店管理系統(tǒng)的特點(diǎn),總結(jié)出如下的需求信息。l 每個(gè)房間有兩個(gè)狀態(tài):空房、已入住。l 每種房間類型下有多個(gè)房間。l 每個(gè)房間有正在入住客人的信息。l 每個(gè)房間有以往所有入住客人的信息。l 一個(gè)房間入主信息指向一個(gè)顧客。l 每個(gè)顧客有自己的入住歷史。2、針對(duì)上述系統(tǒng)功能的分析和需求總結(jié),設(shè)計(jì)如下數(shù)據(jù)項(xiàng)。l 顧客信息:姓名、電話、身份證號(hào)。l 房間記錄:訂房時(shí)間

9、、退房時(shí)間、價(jià)格統(tǒng)計(jì)、入住顧客姓名、入住顧客電話。l 房間信息:類型名稱、使用面積、床位、價(jià)格。l 管理人員:用戶名、密碼、地址、電話。l 房間狀態(tài):狀態(tài)標(biāo)識(shí)。二、概要設(shè)計(jì)(一)數(shù)據(jù)庫概念結(jié)構(gòu)設(shè)計(jì)l 通過上面的數(shù)據(jù)項(xiàng),即可設(shè)計(jì)出滿足需求的各種實(shí)體以及他們之間的關(guān)系,為后面的邏輯結(jié)構(gòu)設(shè)計(jì)打下基礎(chǔ)。這些實(shí)體包含各種具體信息,通過相互之間的作用形成數(shù)據(jù)的流動(dòng)。實(shí)體之間的關(guān)系的E-R圖如下: RoomTypeRoomClient預(yù)定結(jié)算ClientRecord含有1nn1111、 用戶管理E-R圖UserUserIDPasswordUserRoleUsername2.、顧客信息實(shí)體E-R圖:Clien

10、tIdentifyIDClientIDClientNameNativePlaceSex3、房間信息實(shí)體E-R圖:RoomBedNumRoomPostionRoomTypeNameFactPeopleNumPeopleNumRoomID4、顧客入住信息實(shí)體E-R圖:ClientRecordRoomIDTotalMoneyClientNameInDateCheckDateClientID5、房間類型實(shí)體E-R圖:RoomTypeRoomTypeNameBedNumPeopleNumPeoPriceAirConditionToilet6.、整體結(jié)構(gòu)E-R圖:RoomTypeRoomClientCli

11、entRecord預(yù)定結(jié)算ToiletBedNumRoomTypeNamePricePeopleNumAirCondition含有RoomIDBedNumRoomPostionRoomTypeNamePeopleNumFactPeopleNumRoomIDInDateTotalMoneyClientNameCheckDateClientIDIdentifyIDNativePlaceSexClientIDn1n111Check(二)數(shù)據(jù)表設(shè)計(jì)1、(RoomType表)序號(hào)列名數(shù)據(jù)類型是否允許空1RoomTypeNamenchar(20)否2BedNumsmallint否3PeopleNumsma

12、llint否4Pricemoney否5Toiletvarchar(2)否6AirConditionvarchar(2)否2、(Room表)序號(hào)列名數(shù)據(jù)類型是否允許空1RoomIDnchar(15)否2RoomTypeNamenchar(20)否3RoomPostionnchar(10)否4PeopleNumsmallint否5BedNumsmallint否6FactPeopleNumsmallint否3、(Client表)序號(hào)列名數(shù)據(jù)類型是否允許空1ClientIDnchar(16)否2ClientNamenchar(20)否3Sexnchar(2)否4NativePlacenchar(20)

13、否5IdentifyIDnchar(20)是4、(ClientRecord表)序號(hào)列名數(shù)據(jù)類型是否允許空1ClientIDnchar(16)否2ClientNamenchar(20)否3RoomIDnchar(15)否4InDatedatetime否5CheckDatedatetime否6TotalMoneymoney是7CheckChar(2)是5、(User)序號(hào)列名數(shù)據(jù)類型是否允許空1UserIDnchar(10)否2Usernamenchar(10)否3Passwordnchar(20)否4UserRolenchar(10)否三、詳細(xì)設(shè)計(jì)(一)系統(tǒng)詳細(xì)設(shè)計(jì)目標(biāo)規(guī)劃在此階段設(shè)計(jì)出具體能夠

14、運(yùn)行的系統(tǒng),詳細(xì)列出新系統(tǒng)的各種參數(shù)與規(guī)格。為即將用C# 編程語言對(duì)其進(jìn)行編寫做好準(zhǔn)備。(二)系統(tǒng)詳細(xì)設(shè)計(jì)任務(wù)1、數(shù)據(jù)結(jié)構(gòu)的設(shè)計(jì):對(duì)于處理過程中涉及的概念性的數(shù)據(jù)類型進(jìn)行確切的定義;2、測(cè)試用例設(shè)計(jì):測(cè)試用例包括輸入數(shù)據(jù)和預(yù)期結(jié)果等內(nèi)容。(三)系統(tǒng)物理配置方案設(shè)計(jì)1 、設(shè)計(jì)指標(biāo)(1)系統(tǒng)吞吐量要提高系統(tǒng)的吞吐量,就要求使用具有大吞吐量的計(jì)算機(jī)。應(yīng)該選擇具有較高性能的計(jì)算機(jī)。(2)系統(tǒng)響應(yīng)時(shí)間響應(yīng)時(shí)間不超過2秒(3)系統(tǒng)處理方式該系統(tǒng)采用主機(jī)系統(tǒng)方式。(4)地域范圍本系統(tǒng)采用局域網(wǎng)方式。(5)數(shù)據(jù)管理方式使用SQL Server2005數(shù)據(jù)管理系統(tǒng)2、 計(jì)算機(jī)硬件配置計(jì)算機(jī)硬件選擇取決于要運(yùn)行的

15、軟件系統(tǒng),本系統(tǒng)建議最低采取如下配置:內(nèi)存:2GBCPU:奔三2.0GHZ 硬盤: 500G(四 )系統(tǒng)輸出設(shè)計(jì)輸出設(shè)計(jì)的內(nèi)容包括:1、 輸出信息應(yīng)包括系統(tǒng)的使用者,如客戶、酒店管理人員、前臺(tái) 服務(wù)人員等。 2、 信息應(yīng)以表格及文檔形式輸出。3、 輸出設(shè)備:打印機(jī)、終端顯示器、Pos機(jī)。4、 輸出介質(zhì):輸出到專用紙張及電腦屏幕上。(五)系統(tǒng)輸入設(shè)計(jì)1、輸入數(shù)據(jù)量設(shè)計(jì)需要輸入客戶數(shù)據(jù),數(shù)據(jù)量不大2、數(shù)據(jù)輸入設(shè)備的選擇本系統(tǒng)選擇鍵盤、鼠標(biāo)人工輸入方式。(六)界面設(shè)計(jì)1、用戶登錄界面設(shè)計(jì)2、超級(jí)用戶登錄界面3、用戶管理界面設(shè)計(jì)4、用戶添加界面設(shè)計(jì)5、用戶修改界面6、主界面7、房間類型管理界面8、客房

16、查詢界面9、客房信息管理界面10、客戶記錄查詢界面11、客戶結(jié)算界面12、客戶入住界面四、代碼設(shè)計(jì)1、用戶表示層(room窗體)using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using Three.DLL;using Three.Model;namespace hotelmanger pu

17、blic partial class Room : Form public Room() InitializeComponent(); private ArrayList mylist; private void Room_Load(object sender, EventArgs e) /combox2的函數(shù) mylist = new ArrayList(); mylist.Add("一樓"); mylist.Add("二樓"); mylist.Add("三樓"); bindingSource1.DataSource = mylis

18、t;/附加數(shù)據(jù)源 boBox2.DataSource = this.bindingSource1; /填充combox1的函數(shù) SqlDataReader w_sda=DLL_room.DLL_AddRoom(); while (w_sda.Read() comboBox1.Items.Add(w_sda0); w_sda.Close(); private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) string cb1_str; cb1_str = comboBox1.SelectedItem.ToStrin

19、g(); /填充combox3,combox4的函數(shù) SqlDataReader W_sda2 = DLL_room.DLL_AddRoom2(cb1_str); while (W_sda2.Read() comboBox3.Items.Add(W_sda22); comboBox4.Items.Add(W_sda21); comboBox3.Text = W_sda22.ToString(); comboBox4.Text = W_sda21.ToString(); W_sda2.Close(); private void show_room_Click(object sender, Eve

20、ntArgs e) DLL_room.ShowRoom(dataGridView1); private void add_room_Click(object sender, EventArgs e) string roomid = roomnum_box.Text; string rtn = comboBox1.Text; string rp = comboBox2.Text; string pn = comboBox3.Text; string bn = comboBox4.Text; string fpn = "0" DLL_room.AddRoom(roomid, r

21、tn, rp, pn, bn, fpn); /查找 private void select_rooom_Click(object sender, EventArgs e) string str = textBox1.Text; DLL_room.SelectRoom(str, dataGridView1); /刪除 private void delete_room_Click(object sender, EventArgs e) string str = textBox1.Text; DLL_room.DeleteRoom(str, dataGridView1); private void

22、exit_room_Click(object sender, EventArgs e) this.Close(); 2、業(yè)務(wù)邏輯層using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using Three.Model;using Three.sqlDAL;using System.Data;using System.Data.SqlClient;namespace Three.DLL public class DLL_room /顯示所有的房間 public sta

23、tic bool ShowRoom( DataGridView dgrid) string strr = "select* from Room" D_room.ShowRoom(strr, dgrid); /D_roomtype.ShowRoomEmployee(strr, dgrid); return true; /查找 public static bool SelectRoom(string str, DataGridView dgvid) string strr = "select *from Room where RoomID='" +

24、str + "'" D_room.ShowRoom(strr, dgvid); return true; /刪除 public static bool DeleteRoom(string str ,DataGridView dgvid) string strr = "delete from Room where RoomID='" + str + "'" D_room.ShowRoom(strr, dgvid); return true; /調(diào)用無參的D_addtable() public static Sql

25、DataReader DLL_AddRoom() SqlDataReader sdr = D_room.D_addtable(); return sdr; /調(diào)用有參的D_addtable() public static SqlDataReader DLL_AddRoom2(string slt_str) string st = slt_str; SqlDataReader sdr = D_room.D_addtable(st); return sdr; /添加相應(yīng)的房間信息 public static int AddRoom(string RoomID, string RoomTypeNam

26、e, string RoomPostion, string PeopleNum, string BedNum, string FactPeopleNum) Room1 M_room = new Room1(); M_room.RoomID = RoomID; M_room.RoomTypeName = RoomTypeName; M_room.RoomPostion = RoomPostion; M_room.PeopleNum = Convert.ToInt32(PeopleNum); M_room.BedNum = Convert.ToInt32(BedNum); M_room.FactP

27、eopleNum = Convert.ToInt32(FactPeopleNum); return D_room.D_ADDRoom(M_room); /增加房間實(shí)際人數(shù) public static int update_factpeople(string r_roomid) return D_room.D_addfactpeoplenum(r_roomid); /減少房間實(shí)際人數(shù) public static int update_jianfactpeopele(string j_roomid) return D_room.D_jianfactpeoplenum(j_roomid); 3、mo

28、del層using System;using System.Collections.Generic;using System.Text;namespace Three.Model/由于窗體中出現(xiàn)了Room.cs,故定義為Room1 public class Room1 private string _RoomID; public string RoomID get return _RoomID; set _RoomID = value; private string _RoomTypeName; public string RoomTypeName get return _RoomTypeNa

29、me; set _RoomTypeName = value; private string _RoomPostion; public string RoomPostion get return _RoomPostion; set _RoomPostion = value; private int _PeopleNum; public int PeopleNum get return _PeopleNum; set _PeopleNum = value; private int _BedNum; public int BedNum get return _BedNum; set _BedNum

30、= value; private int _FactPeopleNum; public int FactPeopleNum get return _FactPeopleNum; set _FactPeopleNum = value; public Room1() public Room1(string roomid, string roomtypename, string roompostion, int peopenum, int bednum, int factpeoplenum) this._RoomID = roomid; this._RoomTypeName = roomtypena

31、me; this._RoomPostion = roompostion; this._PeopleNum = peopenum; this._BedNum = bednum; this._FactPeopleNum = factpeoplenum; 4、數(shù)據(jù)訪問層using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using Three.Model;using Three.database;using System.Data;using System.Data.Sq

32、lClient;namespace Three.sqlDAL public class D_room /顯示所有客房信息 public static bool ShowRoom(string str, DataGridView dgrid) d_Bind.BindDataGrid(str, dgrid); return true; /讀取RoomType中的部分值無參 public static SqlDataReader D_addtable() string str = "select * from RoomType" SqlDataReader sdr ; sdr =

33、 database.d_Bind.BindComboBox(str); return sdr; /讀取RoomType中的部分值有參 public static SqlDataReader D_addtable(string select_str) string str = "select * from RoomType where RoomTypeName='" + select_str + "'" SqlDataReader sdr; sdr = database.d_Bind.BindComboBox(str); return sd

34、r; public static int D_ADDRoom(Room1 M_room) SqlParameter param = new SqlParameter new SqlParameter ("RoomID",M_room.RoomID), new SqlParameter ("RoomTypeName",M_room.RoomTypeName), new SqlParameter ("RoomPostion",M_room.RoomPostion), new SqlParameter ("PeopleNum&qu

35、ot;,M_room.PeopleNum), new SqlParameter ("BedNum",M_room.BedNum), new SqlParameter ("FactPeopleNum",M_room.FactPeopleNum) ; string str = "insert intoRoom(RoomID,RoomTypeName,RoomPostion,PeopleNum,BedNum,FactPeopleNum) values(RoomID,RoomTypeName,RoomPostion,PeopleNum,BedNum,F

36、actPeopleNum)" int i=data.ExecuteNoQuery(str, param); return i; /添加實(shí)際人數(shù) public static int D_addfactpeoplenum(string roomid) string str = "update Room set FactPeopleNum=FactPeopleNum+1 where RoomID='" + roomid + "'" int i = data.ExecuteNoQuery(str); return i; /減少實(shí)際人數(shù)

37、public static int D_jianfactpeoplenum(string roomid) string str = "update Room set FactPeopleNum=FactPeopleNum-1 where RoomID='" + roomid + "'" int i = data.ExecuteNoQuery(str); return i; 5、公用類層(1)data.csusing System;using System.Collections.Generic;using System.Text;usin

38、g System.Data.SqlClient;using System.Data;using System.Windows.Forms;using System.IO;namespace Three.database/封裝數(shù)據(jù)庫 public class data private static string _con = "Data Source=.SQLEXPRESS;AttachDbFilename=F:C#賓館管理系統(tǒng)整合后Solutiondatabasehotel.mdf;Integrated Security=True;Connect Timeout=30;User In

39、stance=True" private static SqlConnection sqlcon = null; public static void Creatcon() if (sqlcon = null) sqlcon = new SqlConnection(_con); sqlcon.Open(); else if (sqlcon.State = ConnectionState.Closed | sqlcon.State = ConnectionState.Broken) sqlcon.Close(); sqlcon.Open(); public static void Cl

40、oseConnection() sqlcon.Close(); /返回連接對(duì)象sqlconnection public static SqlConnection GetSqlconn() return sqlcon; /執(zhí)行增刪改,不帶參數(shù) public static int ExecuteNoQuery(string strsql) int i; try Creatcon(); SqlCommand sqlcomand = new SqlCommand(strsql, sqlcon); i = sqlcomand.ExecuteNonQuery(); sqlcon.Close(); retu

41、rn i; catch return -1; /執(zhí)行增刪改,帶參數(shù) public static int ExecuteNoQuery(string strsql, params SqlParameter param) int i; try Creatcon(); SqlCommand sqlcmd = new SqlCommand(strsql, sqlcon); foreach (SqlParameter par in param) /遍歷數(shù)組將參數(shù)對(duì)象添加到操作命令中 sqlcmd.Parameters.Add(par); i = sqlcmd.ExecuteNonQuery(); ret

42、urn i; catch return -1; public static DataTable GetTable(string strsql) try Creatcon(); SqlDataAdapter sqlada = new SqlDataAdapter(strsql, sqlcon); DataSet dataset = new DataSet(); sqlada.Fill(dataset, "temp"); sqlcon.Close(); return dataset.Tables"temp" catch return null; /帶參數(shù) public static DataTable GetTable(string strsql, params SqlParameter param) try Creatcon(); SqlDataAdapter sda = new SqlDataAdapter(strsql, sqlcon); foreach (SqlParameter par in param) sda.SelectCommand.Parameters.Add(par); DataSet ds = new DataSet(); sda.Fill(ds, "temp"); sqlco

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論