




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、N NI II IT T- -1 1 P Pr ro oj je ec ct t 設設計計報報告告( 2012 - 2013 年度第年度第 1 學期學期)TunersTuners Inc.Inc.專業(yè)專業(yè)計算機科學與技術(計算機科學與技術(NIIT)學生姓名學生姓名班級班級學號學號指導教師指導教師完成日期完成日期NIIT-1 Project目目 錄錄目 錄.21 設計目的.12 設計內容.13 實現(xiàn)方法.23.1 系統(tǒng)目標.23.2 主體功能.23.3 開發(fā)環(huán)境.24 小 結.2附 錄.4附錄 1 源程序清單.4NIIT-1 Project1課題課題2 2:TunerTuner Inc.Inc
2、.1 設計目的 本課程設計是在學完本課程教學大綱規(guī)定的全部內容、完成所有實踐環(huán)節(jié)的基礎上,旨在深化學生學習的 NIIT-1 模塊的課程基本知識,進一步領會掌握Windows 編程的基本方法和技巧,提高分析問題、解決問題的綜合應用能力。2 設計內容課題 2:Tuner Inc.本課題能夠實現(xiàn)僅允許出納、商店營業(yè)人員和商店經(jīng)理角色進行訪問。Tuner Inc.的總店位于舊金山。它在 12 個國家的不同城市有自己的零售商店,店牌為TuneIn。其中每個國家都有一個“國家總店”以管理該國的 TuneIn 商店。作為當年財務年度的業(yè)務目標的一部分,Tuners Inc.的管理層到五個國家開店以拓展業(yè)務。
3、該方案會自動執(zhí)行將在各個“國家總店”和所有 TuneIn 商店全球部署的業(yè)務運作。使用 WPF 實現(xiàn)本程序的相關特性:樣式:向應用程序的 UI 組件應用一致的外觀。模板:自定義現(xiàn)有的 WPF 組件外觀。用戶控件:創(chuàng)建可跨窗口重用的控件。事件處理:在整個應用程序中執(zhí)行各種事件。數(shù)據(jù)綁定:將控件綁定到數(shù)據(jù)源,例如 C#集合和 RDBMS。圖形:顯示音樂商店徽標。動畫:在應用程序中以動畫方式顯示圖像和文本。拖放:簡化應用程序的使用。TuneIn Mate 應用程序預想模塊圖:NIIT-1 Project2CashierStore ManagerStore OperatorLogin ModuleSt
4、ock Management ModuleSales Management ModuleConfiguration ModuleDiscount ModuleTuneIn Mate3 實現(xiàn)方法3.1 系統(tǒng)目標通過 Visual Studio 2010 使用 WPF,建立出納員(Cashier) 、商店營業(yè)員(Store Operator)和商店經(jīng)理(Store Manager)的登陸模塊、身份認證以及相關的操作窗口,比如:添加新賬單、查看賬單信息。3.2 主體功能登錄模塊:對應用程序用戶進行身份認證和授權。配置模塊:配置登錄憑證。庫存管理模塊:管理商店庫存。銷售管理模塊:管理專輯購買。折扣模塊
5、:管理專輯折扣。系統(tǒng)允許商店營業(yè)員執(zhí)行以下操作:(1)記錄商店里收到的新專輯。(2)記錄要送回“國家總店”的任何未出售專輯。系統(tǒng)允許出納執(zhí)行以下操作:(1)為顧客做出的購買生成賬單。(2)在做出購買時自動更新當前庫存。(3)生成每日銷售結算報告。系統(tǒng)允許商店經(jīng)理執(zhí)行以下操作:(1)在每個工作日結束時查看并更新每日銷售結算報告。(2)在每個工作日結束時查看并更新每日庫存報告。(3)對專輯提供特價折扣優(yōu)惠。3.3 開發(fā)環(huán)境Visual Studio 2010NIIT-1 Project3SQL Server 20084 小 結第十七周的課程設計,很快就過去了。其實要說如何熟練運用所學的專業(yè)知識去完
6、成這個課程設計,我覺得自己還差得很遠。上課時老師講的很快,內容又很多,平時花的時間久不多,所以到了做課程設計的時候,很多東西都是現(xiàn)學現(xiàn)賣的,以至于經(jīng)常是自己有好多想法,但是找課本解決總是不能很好地實現(xiàn)自己的預期效果。我覺得在課程設計中,團隊合作很重要。同時做一個課題的幾個同學,大家可以在一起討論,共同解決。很多時候大家一起思考,一起查資料,一起調試程序,看似很復雜的問題就很容易解決。所以,人不能夠脫離集體,離開集體的個人是很難有什么大作為的。這也是我在課程設計中體會到的。對于我做的第二個課題Tuners Inc. ,其實我做的內容不多,一開始的窗體框架很簡單,基本上大家都會。重點是在對 WPF
7、 操作時,因為我們基本上倒要涉及到處理數(shù)據(jù),包括添加、查看、刪除等等。因為在 C#中,我們也涉及到關于在程序中實現(xiàn)對文件數(shù)據(jù)的“讀”與“寫” 。但是,對于要在表格中展現(xiàn)的相關數(shù)據(jù),則需要運用到 SQL Server,以及怎樣在 WPF 中實現(xiàn)數(shù)據(jù)庫的鏈接。在 GUI 課上,老師后面關于 LINQ 基本上都是一帶而過,而 SQL 課程上,老師也沒有對連接數(shù)據(jù)庫做詳細的介紹。這些因素直接導致了我們在做課程設計的時候遇到“瓶頸” ,然后我就一直卡在這邊。一直到我們班有同學實現(xiàn)了數(shù)據(jù)庫的鏈接,然后去了解了一下實現(xiàn)過程。我很郁悶的發(fā)現(xiàn)自己電腦安裝的 Visual Studio 2010 居然鏈接不起來數(shù)
8、據(jù)庫,只好去同學的電腦上面做了。雖然課程設計完成了,但是我覺得交上去的程序還是有許多地方需要加工完善,而且目前實現(xiàn)的操作也少的可憐。學習與實踐相結合,反復實踐才能實現(xiàn)學習的目標,才能為以后的學習、工作打好基礎。NIIT-1 Project4附附 錄錄附錄 1 源程序清單Mainwindow: Mainwindow:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using Sys
9、tem.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;NIIT-1 Project5using System.IO;namespace WpfApplication1 / / MainWindow.xaml 的交互邏輯 / public partial cla
10、ss MainWindow : Window public MainWindow() InitializeComponent(); bool canLogin = false; private void button1_Click(object sender, RoutedEventArgs e) int c = 0; string strLine, LoginName, Password; c+; if (c 3) MessageBox.Show(you do not have chances!); if (comboBox1.Text.Length 0 & textBox2.Pas
11、sword.Length 0) FileStream fStream = File.Open(D:/UserInformation111.txt, FileMode.Open); StreamReader sReader = new StreamReader(fStream); while (!sReader.EndOfStream) strLine = sReader.ReadLine(); LoginName = strLine.Substring(0, strLine.IndexOf(;); Password = strLine.Substring(strLine.IndexOf(;)
12、+ 1); if (LoginName = comboBox1.Text.Trim() & Password = textBox2.Password.Trim() canLogin = true; break; fStream.Close(); sReader.Close(); if (canLogin) if (comboBox1.Text.Trim() = StoreManager) this.Hide(); this.WindowState = WindowState.Minimized; Window2 frmMain = new Window2(); frmMain.Show
13、(); NIIT-1 Project6 if (canLogin) if (comboBox1.Text.Trim() = Cashier) this.Hide(); this.WindowState = WindowState.Minimized; Window4 frmMain = new Window4(); frmMain.Show(); if (canLogin) if (comboBox1.Text.Trim() = StoreOperator) this.Hide(); this.WindowState = WindowState.Minimized; Window4 frmMa
14、in = new Window4(); frmMain.Show(); private void button2_Click(object sender, RoutedEventArgs e) Close(); Window1: NIIT-1 Project7 Window1:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;us
15、ing System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Shapes;namespace WpfApplication1 / NIIT-1 Project8 / Window1.xaml 的交互邏輯 / public partial class Window1 : Window BillDataContext cl = new BillDataContext(); Bill
16、clinic = new Bill(); public Window1() InitializeComponent(); cl = new BillDataContext(); loaddata(); private void loaddata() dataGrid1.ItemsSource = cl.Bill.ToList(); private void button1_Click_1(object sender, RoutedEventArgs e) Bill bill = new Bill(); bill.Name = textBox1.Text; bill.Number = int.P
17、arse(textBox2.Text); bill.Type = textBox3.Text; bill.Time = textBox4.Text; bill.Price = int.Parse(textBox5.Text); cl.Bill.InsertOnSubmit(bill); cl.SubmitChanges(); textBox1.Text = ; textBox2.Text = ; textBox3.Text = ; textBox4.Text = ; textBox5.Text = ; loaddata(); private void button2_Click(object
18、sender, RoutedEventArgs e) Close(); Window2: Window2:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;NIIT-1 Project10using System.W
19、indows.Media;using System.Windows.Media.Imaging;using System.Windows.Shapes;namespace WpfApplication1 / / Window2.xaml 的交互邏輯 / public partial class Window2 : Window BillDataContext cl = new BillDataContext(); Room room = new Room(); public Window2() InitializeComponent(); cl = new BillDataContext();
20、 loaddata(); private void loaddata() dataGrid1.ItemsSource = cl.Room.ToList(); private void button1_Click(object sender, RoutedEventArgs e) Window3 frmMain = new Window3(); frmMain.Show(); private void button2_Click(object sender, RoutedEventArgs e) Window1 frmMain = new Window1(); frmMain.Show(); p
21、rivate void button3_Click(object sender, RoutedEventArgs e) room.Number = int.Parse(textBox1.Text); room.Type = textBox2.Text; room.Using = textBox3.Text; cl.Room.InsertOnSubmit(room); cl.SubmitChanges(); textBox1.Text = ; textBox2.Text = ; textBox3.Text = ; loaddata(); private void button4_Click(ob
22、ject sender, RoutedEventArgs e) Close(); NIIT-1 Project11Window3: Window3:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using Sys
23、tem.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Shapes;namespace WpfApplication1NIIT-1 Project12 / / Window3.xaml 的交互邏輯 / public partial class Window3 : Window BillDataContext cl = new BillDataContext(); Discount discount = new Discount(); public Window3() InitializeCompone
24、nt(); cl = new BillDataContext(); loaddata(); private void loaddata() dataGrid1.ItemsSource = cl.Discount.ToList(); private void button1_Click(object sender, RoutedEventArgs e) discount.Time = int.Parse(textBox1.Text); discount.Discounting = int.Parse(textBox2.Text); cl.Discount.InsertOnSubmit(disco
25、unt); cl.SubmitChanges(); textBox1.Text = ; textBox2.Text = ; loaddata(); private void button2_Click(object sender, RoutedEventArgs e) Close(); Window4: Window4:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Shapes;namespace WpfApplication1 / / Window4.xaml 的交互邏輯 / public partial class Window4 : Window Bill
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 廣播電視設備用網(wǎng)絡通信模塊考核試卷
- 城市垃圾填埋場規(guī)劃考核試卷
- 文化創(chuàng)意產(chǎn)業(yè)的資本運作與市場發(fā)展動態(tài)考核試卷
- 意外傷害保險在旅游業(yè)的風險管理考核試卷
- 乳飲料的無乳糖配方設計與市場潛力考核試卷
- 文具企業(yè)產(chǎn)品線規(guī)劃考核試卷
- 葡萄加工售賣合同范本
- 旅游門票售賣合同范本
- 土建付款合同范本
- 第四季度營銷工作重點計劃及時間表安排方案
- 2025年幼兒園膳食工作計劃
- 《基于二維激光SLAM的AGV導航系統(tǒng)設計》
- 藥劑學第9版課件:第一章-緒論
- 《下載-綜合布線》課件
- 電化學儲能系統(tǒng)測試操作方法
- (高清版)DB43∕T 1588.28-2019 小吃湘菜 第28部分:武岡空餅
- 第六單元 共同面對的全球性問題 知識清單
- 老年病科重點專科建設
- 工程投標文件范本完整版
- 小學二年級開學家長會課件2024-2025學年
- 語文跨學科合作:語文與數(shù)學的融合
評論
0/150
提交評論