freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

餐飲管理系統(tǒng)數(shù)據(jù)庫課程設計論文-資料下載頁

2025-08-07 07:50本頁面
  

【正文】 9。, conn)。 ()。 ()。 ()。 } } } 代碼不全,其他代碼見源代碼 餐飲服務人員信息管理模塊的設計餐飲服務人員信息管理窗體主要是對服務人員信息進行管理??蓪崿F(xiàn)對服務人員信息的查詢、增加、改變與刪除。 服務人員信息管理窗體 服務人員信息管理窗體的主要實現(xiàn)代碼如下: private void BindData()//將查詢信息綁定到datagridview控件上 { SqlConnection conn = ()。 SqlDataAdapter sda = new SqlDataAdapter(select WaiterName,CardNum,WaiterNum, Sex,Age,Tel,ID from Waiter order by ID desc, conn)。 DataSet ds = new DataSet()。 (ds)。 = [0]。 } private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { txtname .Text = [0].()。 txtID .Text = [1].()。 = [2].()。 cmbGender .Text = [3].()。 txtAge .Text = [4].()。 txtTel .Text = [5].()。 = true。 = true。 = true。 } private void btnSave_Click(object sender, EventArgs e)//單擊保存按鈕會執(zhí)行如下代碼 { SqlConnection conn = ()。 ()。 SqlCommand cmd = new SqlCommand(select count(*) from Waiter where WaiterName=39。 + txtname .Text + 39。, conn)。 int i = (())。//執(zhí)行查詢語句,查看執(zhí)行語句后影響的行數(shù) if (i 0) { //根據(jù)各個文本框中輸入內容更新數(shù)據(jù)庫中waiter表 cmd = new SqlCommand(update Waiter set WaiterName=39。 + + 39。,CardNum=39。 + + 39。,WaiterNum=39。 + + 39。,Sex=39。 + () + 39。,Age=39。 + + 39。,Tel=39。 + + 39。 where ID=39。 + [6].() + 39。, conn)。 ()。 ()。 BindData()。 = true。 = true。 = true。 } else { //應用sql語句向waiter表中添加一行數(shù)據(jù) cmd = new SqlCommand(insert into Waiter(WaiterName,CardNum,WaiterNum, Sex,Age,Tel,ID) values(39。 + () + 39。,39。 + () + 39。,39。 + () + 39。,39。 + () + 39。,39。 + () + 39。,39。 + () + 39。,39。 + () + 39。), conn)。 ()。 ()。 BindData()。 = true。 = true。 = true。 } } private void btnDelete_Click(object sender, EventArgs e) { SqlConnection conn = ()。 ()。 //將單擊選中的datagridview控件上的一行內容從數(shù)據(jù)表中刪除 SqlCommand cmd = new SqlCommand(delete from Waiter where ID=39。 + [6].() + 39。, conn)。 ()。 ()。 BindData()。 } 代碼不全,其他代碼見源代碼 數(shù)據(jù)庫管理模塊的設計數(shù)據(jù)庫管理模塊主要用來對數(shù)據(jù)庫進行備份與回復,防止機器在down掉的時候數(shù)據(jù)信息會全部丟失,利用此功能可以大大減少損失,將數(shù)據(jù)恢復到最近記錄的數(shù)據(jù)備份。 數(shù)據(jù)庫管理模塊窗體 數(shù)據(jù)庫管理窗體的主要實現(xiàn)代碼如下 private void button1_Click(object sender, EventArgs e) { try { string strg = ()。//獲取啟動了可執(zhí)行文件的路徑 strg = (0, (\\))。 strg += @\Data。//將路徑字串和\Data連接,為了將備份文件存在\data根目錄下 string sqltxt = @BACKUP DATABASE restaurantManage TO Disk=39。 + strg + \\ + txtDatabaseName .Text + .bak + 39。//aql語句,實現(xiàn)數(shù)據(jù)庫文件備份 SqlConnection conn = ()。 ()。 SqlCommand cmd = new SqlCommand(sqltxt, conn)。 ()。 ()。 if ((備份成功, 提示, , ) == ) { ()。 } } catch (Exception ex) { (())。 } } private void btnQuit_Click(object sender, EventArgs e) { ()。 } private void tabPage2_Click(object sender, EventArgs e)//單擊回復數(shù)據(jù)庫選項卡會執(zhí)行如下代碼 { string strg = ()。 strg = (0, (\\))。 strg += @\Data。 = strg + \\ + 。//將備份文件路徑顯示到txt2DataName .Text上 } private void btnRecovery_Click(object sender, EventArgs e) { try { string str = use master restore database restaurantManage from Disk=39。 + txt2DataName .Text .Trim () + 39。//sql語句用來執(zhí)行數(shù)據(jù)庫的恢復 SqlConnection conn = ()。 ()。 SqlCommand cmd = new SqlCommand(str, conn)。 ()。 if ((恢復成功, 提示, , ) == ) { ()。 } } catch (Exception ex) { (())。 } } 第5章 測試與總結 程序上存在的潛在問題在程序的編寫過程中我主要運用了單元測與集成測的方法對程序進行測試,測試中出現(xiàn)了一些問題,由于沒有錄入文檔,缺失了這方面的記錄,主要失誤在對數(shù)據(jù)庫中數(shù)據(jù)的增、刪、改上,由于想的不周到,導致了增、刪、改數(shù)據(jù)上的不完整。程序還存在一些問題沒有解決,例如對所修改數(shù)據(jù)的格式的認定上還存在一些紕漏,還有待與去改進,在以后的運行與測試中會發(fā)現(xiàn)大量的問題的,在后期的維護中還有待于去修改,本軟件的復用性不是很好,并沒有很好的做到抽象。 總結做程序時,一定不要急于編寫代碼,而應該首先把需求分析做好,同時把個模塊之間的關系、作用和功能了解清楚,另外,值得注意的是,為了方便程序的后期維護,在編寫代碼的過程中,整體分析一定要明確,代碼編寫一定要規(guī)范。
點擊復制文檔內容
化學相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1