汽車銷售管理系統(tǒng)的設計與開發(fā)_第1頁
汽車銷售管理系統(tǒng)的設計與開發(fā)_第2頁
汽車銷售管理系統(tǒng)的設計與開發(fā)_第3頁
汽車銷售管理系統(tǒng)的設計與開發(fā)_第4頁
汽車銷售管理系統(tǒng)的設計與開發(fā)_第5頁
已閱讀5頁,還剩60頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、畢畢 業(yè)業(yè) 設設 計計( 論論 文文) 汽車銷售管理系統(tǒng)的設計與開發(fā)汽車銷售管理系統(tǒng)的設計與開發(fā) 論文作者姓名: 申請學位專業(yè): 申請學位類別: 指導教師姓名(職稱) : 論文提交日期: 汽車銷售管理系統(tǒng)的設計與開發(fā)汽車銷售管理系統(tǒng)的設計與開發(fā) 摘摘 要要 本設計講述如何為一個汽車 4S 店鋪建立一個汽車銷售管理系統(tǒng)。首先進行 系統(tǒng)的需求分析,提出系統(tǒng)任務和系統(tǒng)業(yè)務流程的分析。其次,用 SQL Server 2000 建立系統(tǒng)運行所要的后臺數(shù)據(jù)庫。在數(shù)據(jù)庫設計中,本設計又先對數(shù)據(jù)庫 進行需求分析和概念設計結構的列出,這樣得到了較合理的邏輯數(shù)據(jù)結構,利 用此數(shù)據(jù)的結構才能支持系統(tǒng)的各模塊的實現(xiàn)。

2、然后通過 Microsoft Visual Studio .NET 2003 進行各個系統(tǒng)功能模塊的創(chuàng)建和系統(tǒng)的實現(xiàn)。在創(chuàng)建過程中, 本設計先從系統(tǒng)主模塊著手,再實現(xiàn)各個小的模塊功能。最后在系統(tǒng)實現(xiàn)的過 程中將數(shù)據(jù)庫連接起來,實現(xiàn)整個系統(tǒng)的正常運行。一個正常進行的汽車銷售 需要管理所擁有的汽車信息的設置、銷售人員的信息和客戶的信息等,更重要 的還要提供汽車信息管理。面對各種不同種類的信息,需要合理的數(shù)據(jù)庫結構 來保存數(shù)據(jù)信息以及有效的程序結構支持各種數(shù)據(jù)操作的執(zhí)行。 關鍵詞關鍵詞:網(wǎng)上訂購;數(shù)據(jù)庫;信息管理 Design and Implementation of the Automobile

3、 Sale System Abstract This design is mean to state how to build a automobile sales management system for a 4Sshop.First is to analyze the system, pointing out the analysis of systematic mission and the process of it. Then the author build a background data-base by using SQL Server 2000.In designing

4、the data-base, the author analyze the need of the data structure and list all the designs of the concept, through which the author get a relatively reasonable logic data structure and realize each systematic module by using it. And then the author builds each function of the systematic module and re

5、alizes the system. In the process of creation, the author starts from the main systematic module and then realizes each small one. In the final process of realizing the system, the author connects the databases, realizing the normal operation of the whole system. A normally operated sales of automob

6、iles need the administration of the set of the occupied automobiles, the information of the sales people and the of the customers and so on .What is more important is the information management of the automobiles .In face of the variety of information, what the author need is the structure of the da

7、ta- base to store the information and the effective structure of the process to support the operation of the various data. Key words: Online order; Database; Information Management 目目 錄錄 論文總頁數(shù):25 頁 1 引言引言.1 1.1課題研究背景.1 1.2本課題的研究意義.1 1.3本課題的研究方法.1 2開發(fā)工具的選擇開發(fā)工具的選擇.1 2.1SQL SERVER數(shù)據(jù)庫管理系統(tǒng)簡介 .1 2.2C語言簡介.

8、2 3系統(tǒng)需求分析與設計系統(tǒng)需求分析與設計.2 3.1系統(tǒng)功能結構.2 3.2系統(tǒng)管理模塊分析.2 4數(shù)據(jù)庫的詳細設計與實現(xiàn)數(shù)據(jù)庫的詳細設計與實現(xiàn).2 4.1數(shù)據(jù)庫需求與功能分析.2 4.2數(shù)據(jù)庫模塊設計結構.3 4.3數(shù)據(jù)庫物理結構設計.5 4.4各數(shù)據(jù)表關系圖.7 4.5數(shù)據(jù)庫結構實現(xiàn).7 4.5.1數(shù)據(jù)庫的連接 .7 4.5.2數(shù)據(jù)庫連接后實現(xiàn)數(shù)據(jù)的調用 .7 4.5.3數(shù)據(jù)存儲過程的實現(xiàn) .8 4.5.4實現(xiàn)數(shù)據(jù)庫調用的部分關鍵語句 .8 5汽車銷售管理系統(tǒng)前臺模塊實現(xiàn)汽車銷售管理系統(tǒng)前臺模塊實現(xiàn).11 5.1模塊實現(xiàn)部分:運行主登錄界面.11 5.2 銷售人員登陸頁面 .12 5.3

9、 客戶管理服務頁面 .14 5.4 客戶定購信息以及回饋頁面.17 6系統(tǒng)測試總結系統(tǒng)測試總結.21 6.1系統(tǒng)實現(xiàn)的特點.21 6.2系統(tǒng)實現(xiàn)的功能測試總結.21 結結 論論.22 參考文獻參考文獻.22 致致 謝謝.23 聲聲 明明.24 1 1 引言引言 1.11.1 課題研究背景課題研究背景 汽車產業(yè)的興旺發(fā)展帶動顧客對于汽車類型選擇的大步前進,目前大多數(shù) 汽車銷售連鎖店的銷售管理是用簡易進行的。隨著汽車款式的不斷更新,汽車 各項功能配置會不斷的增多,簡易工作已不能適應時代的發(fā)展需求,由于各銷 售店每天的銷售量很大,難免會在業(yè)務方面及財務方面出現(xiàn)漏洞,給企業(yè)的經(jīng) 營帶來種種弊端,有時還

10、會帶給客戶不必要的麻煩。要想解決這些難題,就必 須有一套科學、高效、嚴密汽車銷售管理系統(tǒng)作為依托進行和客戶的交易。當 今的中小企業(yè),一般應具有產品開發(fā)、生產、銷售、服務的能力,為此企業(yè)都 設有相應的機構,以管理各個環(huán)節(jié)的業(yè)務。以此前提作為系統(tǒng)設計的基礎,開發(fā) 一個更適合客戶和銷售人員交流的這樣一個汽車銷售系統(tǒng),來滿足日益發(fā)展的汽 車銷售業(yè).的要求。 1.21.2 本課題的研究意義本課題的研究意義 為了更好的適應汽車銷售管理市場發(fā)展的不平衡性,更好的為客戶在選擇 汽車類型方面便利,為更多不了解汽車的客戶提供一個交流平臺,我們選擇這 樣一個 MIS 信息管理系統(tǒng)來進行。 1.31.3 本課題的研究

11、方法本課題的研究方法 本系統(tǒng)是在充分理解 MIS 系統(tǒng),具備了一定的軟件設計與開發(fā)的能力的前 提條件下。綜合以前所學理論知識,結合自己的實際開發(fā)水平,設計并開發(fā)完 成的一個汽車銷售管理系統(tǒng)。該系統(tǒng)運用了 C/S 模式開發(fā),用 C#語言作為開發(fā) 的前臺語言,數(shù)據(jù)庫采用 SQLserver2000。 2 2開發(fā)工具的選擇開發(fā)工具的選擇 2.12.1 SQLSQL ServerServer 數(shù)據(jù)庫管理系統(tǒng)簡介數(shù)據(jù)庫管理系統(tǒng)簡介 本系統(tǒng)的開發(fā)選擇了 SQL 數(shù)據(jù)庫,它適用于中小型事物處理及客戶端/服務 端結構的應用系統(tǒng)。它功能強大操作簡便,日益為廣大數(shù)據(jù)庫用戶所喜愛。越來 越多的開發(fā)工具提供了與 SQ

12、L Server 的接口。SQL Server 2000 是 Microsoft 公司推出的 SQL Server 數(shù)據(jù)庫管理系統(tǒng)的最新版本,該版本繼承了 SQL Server 7.0 版本的優(yōu)點,同時又比它增加了許多更先進的功能、具有使用方便、 可伸縮性好與相關軟件集成程度高等優(yōu)點。MSSQL Server 不但可以應用于大中 型數(shù)據(jù)庫管理中,建立分布式關系數(shù)據(jù)庫,并且也可以開發(fā)桌面數(shù)據(jù)庫。事實 上,SQL Server 數(shù)據(jù)庫處理的基本結構,采取關系型數(shù)據(jù)庫模式,盡管如此, 相信大家都可以輕易的發(fā)現(xiàn),在 SQL Server 的數(shù)據(jù)庫處理方式,則是使用面向 對象的操作方式與精神,也就是說,

13、SQL Server 的所有功能,都可以基于系統(tǒng) 已經(jīng)建立好的一些對象來達成,是相當 OO(面向對象)的一個系統(tǒng)結構。 2.22.2 C C語言簡介語言簡介 C#是一種現(xiàn)代的面向對象語言。它使程序員快速便捷地創(chuàng)建基于 Microsoft .NET 平臺的解決方案。這種框架使 C#組件可以方便地轉化為 XML 網(wǎng) 絡服務,從而使任何平臺的應用程序都可以通過 Internet 調用它。 C#增強了 開發(fā)者的效率,同時也致力于消除編程中可能導致嚴重結果的錯誤。我認為程 序員可以快速進行網(wǎng)絡開發(fā),同時也保持了開發(fā)者所需要的強大性和靈活性。 使得我們在語言和模塊實現(xiàn)方面更加快捷和方便。 3 3系統(tǒng)需求分

14、析與設計系統(tǒng)需求分析與設計 3.13.1 系統(tǒng)系統(tǒng)功能結構功能結構 本課題的具體任務就是設計一個汽車銷售管理信息系統(tǒng),它是一款利用現(xiàn) 代計算機和數(shù)據(jù)庫開發(fā)技術來代替人工處理,從而減輕企業(yè)各部門工作人員的 勞動強度,提高工作質量和效率,提高信息資源的利用率和企業(yè)管理水平的實 用軟件。其主要的功能設計有:對汽車類型的購進,客戶信息及銷售情況進行 日常的管理,如:添加、刪除、修改數(shù)據(jù)庫信息;查詢信息;系統(tǒng)維護等。該 系統(tǒng)還有在銷售人員登錄后能夠自動庫存更新的功能,使得企業(yè)能夠對汽車信 息進行實時的管理,提高工作效率。 3.23.2 系統(tǒng)管理模塊分析系統(tǒng)管理模塊分析 通過對汽車銷售管理業(yè)務的調查分析與

15、資料查詢,弄清了汽車銷售管理的 工作業(yè)務流程和管理功能。 汽車銷售管理信息系統(tǒng)主要有以下幾項管理功能: 信息數(shù)據(jù)管理:管理員對汽車信息的輸入、存庫和維護。 客戶請求信息管理:對銷售業(yè)務涉及的問題進行交流回饋。 客戶定購信息管理:對客戶定購需求的信息進行歸檔管理。 汽車信息管理:對新進汽車的信息進行歸檔管理。 信息查詢統(tǒng)計管理:管理員通過對客戶提供的汽車信息找到客戶所需的汽 車并通過客戶信息庫對客戶的核查后,把客戶所需的汽車信息提供給客戶。對 銷售、庫存等的統(tǒng)計。 4 4數(shù)據(jù)庫的詳細設計數(shù)據(jù)庫的詳細設計與實現(xiàn)與實現(xiàn) 4.14.1 數(shù)據(jù)庫需求與功能分析數(shù)據(jù)庫需求與功能分析 用戶的需求具體體現(xiàn)在各種

16、信息的提供、保存、更新和查詢,這就要求數(shù) 據(jù)庫結構能充分滿足各種信息的輸出和輸入。收集基本數(shù)據(jù)、數(shù)據(jù)結構以及數(shù) 據(jù)處理的流程,組成一份詳盡的數(shù)據(jù)字典,為后面的具體設計打下基礎。同時 在完成基本功能的同時還要實現(xiàn)銷售人員對于客戶問題回答,以及客戶對于汽 車選購等等實現(xiàn)功能。 仔細分析調查有汽車銷售公司管理信息需求的基礎上,將得到如圖所示的 本系統(tǒng)所處理的數(shù)據(jù)流程。 進入系統(tǒng) 分類查詢 選購汽車 訂購 判斷是否登錄 是否繼續(xù)選購 客戶信息 生產訂單 查看訂單 信息回饋 N Y 開始 N Y 圖 4-1 客戶與銷售人員交易圖 4.24.2 數(shù)據(jù)庫模塊設計結構數(shù)據(jù)庫模塊設計結構 有了以上數(shù)據(jù)項以及數(shù)據(jù)

17、結構后,以及實現(xiàn)的各項以后,就可以設計出能 夠滿足用戶需求的各種實體,以及它們之間的關系,為后面的邏輯結構設計打 下基礎。這些實體包含各種具體信息,通過相互之間的作用形成數(shù)據(jù)的流動。 根據(jù)上面得出有以下數(shù)據(jù)項:ACASE(客戶信息實體) ;AutoMobile(汽車 信息實體) ;Emploee(銷售人員信息實體) ;FQ(客戶服務信息實體) ; Picture(圖片信息實體) ;Resolvecase(回饋信息實體) ACASE(客戶信息實體)E-R 圖: ID CComment s autoIDCustom EComment s aCase 圖 4-2 ACASE(客戶信息實體)E-R 圖

18、 AutoMobile(汽車信息實體)E-R 圖: ID Cost aName Company Price AutoMobile 圖 4-3 AutoMobile(汽車信息實體)E-R 圖 Emploee(銷售人員信息實體)E-R 圖: 圖 4-4 Emploee(銷售人員信息實體)E-R 圖 FQ(客戶服務信息實體)E-R 圖: ID AnswerautoID Quest ion State FQ 圖 4-5 FQ(客戶服務信息實體)E-R 圖 Picture(圖片信息實體)E-R 圖: Pic aName Picture 圖 4-6 Picture(圖片信息實體)E-R 圖 Resolve

19、case(回饋信息實體)E-R 圖: IDPwd eNamePosition Emploee 圖 4-7 Resolvecase(回饋信息實體)E-R 圖 購買 汽車客戶 m1 圖 4-8 購買關系 E-R 圖 4.34.3 數(shù)據(jù)庫物理結構設計數(shù)據(jù)庫物理結構設計 現(xiàn)在需要將上面的數(shù)據(jù)庫概念結構轉化為 SQL Server 2000 數(shù)據(jù)庫系統(tǒng)所支 持的實際數(shù)據(jù)模型,也就是數(shù)據(jù)庫的邏輯結構。 汽車銷售管理系統(tǒng)數(shù)據(jù)庫中各個表格的設計結果如下面表格所示。每個表 格表示在數(shù)據(jù)庫中的一個表。 表 4-1 客戶信息表 aCase 列名數(shù)據(jù)類型長度是否為空 IDint40 autoIDint40 Custo

20、mchar100 CCommentschar1000 ECommentschar1000 orderDatedatetime80 Paymentchar500 Citychar200 表 4-2 汽車信息表 AutoMobile 列名數(shù)據(jù)類型長度是否為空 IDint40 aNamechar400 Companychar500 Costint40 Priceint40 Amountint40 Descriptionchar4000 ProfitID autoID resolvedCase 表 4-3 銷售人員信息表 Emploee 列名數(shù)據(jù)類型長度是否為空 IDint40 eNamechar10

21、0 Positionchar200 Pwdchar200 uvaluenvarchar2551 lvalueimage161 versionint40 表 4-4 客戶服務信息表 FQ 列名數(shù)據(jù)類型長度是否為空 IDint40 autoIDint40 Questionchar2000 Answerchar4000 Stateint40 表 4-5 圖片信息表 Picture 列名數(shù)據(jù)類型長度是否為空 aNamechar400 Picimage160 表 4-6 回饋信息表 resolvedCase 列名數(shù)據(jù)類型長度是否為空 IDint40 autoIDint40 Profitint40 4.4

22、4.4 各數(shù)據(jù)表關系圖各數(shù)據(jù)表關系圖 Picture a aN Na am me e P Pi ic c FK1ID resolvedCase P PK K, ,F FK K1 1I ID D a au ut to oI ID D P Pr ro of fi it t aCase P PK KI ID D a au ut to oI ID D C Cu us st to om m C CC Co om mm me en nt ts s E EC Co om mm me en nt ts s o or rd de er rD Da at te e P Pa ay ym me en nt t C

23、Ci it ty y AutoMobile a aN Na am me e C Co om mp pa an ny y C Co os st t P Pr ri ic ce e A Am mo ou un nt t D De es sc cr ri ip pt ti io on n FK1ID Emploee e eN Na am me e P Po os si it ti io on n P Pw wd d FK1ID FQ P PK K, ,F FK K1 1I ID D a au ut to oI ID D Q Qu ue es st ti io on n A An ns sw we e

24、r r S St ta at te e 圖 4-8 數(shù)據(jù)表關系圖 4.54.5 數(shù)據(jù)庫結構實現(xiàn)數(shù)據(jù)庫結構實現(xiàn) 通過前面對于數(shù)據(jù)庫部分的分析,現(xiàn)在可以在 SQL Server 2000 數(shù)據(jù)庫系統(tǒng) 中實現(xiàn)該邏輯結構。這是利用 SQL Server 2000 數(shù)據(jù)庫系統(tǒng)中的 SQL 查詢分析 器實現(xiàn)的。下面給出部分實現(xiàn)上面各種關系的 SQL 語句。 .1 數(shù)據(jù)庫數(shù)據(jù)庫的連接的連接 表示使用當前登錄到系統(tǒng)的帳號訪問后臺數(shù)據(jù)庫,進行數(shù)據(jù)相關的調用 class opAutoMobile private string conStr = server=D9J5732X;Integrated

25、Security=SSPI;DataBase=SaleDB; private DbObject db; public opAutoMobile() db = new DbObject(conStr); .2 數(shù)據(jù)庫連接后實現(xiàn)數(shù)據(jù)的調用數(shù)據(jù)庫連接后實現(xiàn)數(shù)據(jù)的調用 通過以下被設定的參數(shù)訪問 SQLServer,并且通過 sqlcommand 和 sqlconnection 來實現(xiàn)數(shù)據(jù)庫更新,通過想數(shù)據(jù)庫發(fā)送更新數(shù)據(jù)庫的 SQL 語句實 現(xiàn). class DbObject private SqlConnection connection; private string connect

26、String; public DbObject(string constring) this.connectString = constring; this.connection = new SqlConnection(this.connectString); private SqlCommand buildCommand(string storedProc,SqlParameter parameters) SqlCommand command = new SqlCommand(); command.Connection = this.connection; command.CommandTe

27、xt = storedProc.Trim(); command.CommandType = CommandType.StoredProcedure; if(parameters != null) foreach(SqlParameter p in parameters) command.Parameters.Add(p); return command;/buildCommand .3 數(shù)據(jù)存儲過程的實現(xiàn)數(shù)據(jù)存儲過程的實現(xiàn) SqlDataReader 實現(xiàn)單項數(shù)據(jù)操作,不提供數(shù)據(jù)的緩存,并且在整個過程中 它由 Buildcommond 產生,實現(xiàn)數(shù)據(jù)參數(shù)的傳遞,在實現(xiàn)過程中,構

28、造了 sql Command 對象 cmd,然后調用 cmd 的 ExecuteReader 方法,并且返回一個 Reader 對象,實現(xiàn)存儲. public SqlDataReader runProcedure(string storedProc,SqlParameter parameters) SqlDataReader reader; SqlCommand cmd = this.buildCommand(storedProc,parameters); if(connection.State = ConnectionState.Closed ) connection.Open(); Rea

29、der = cmd.ExecuteReader(CommandBehavior.CloseConnection); /connection.Close(); return reader; public void extProcedure(string storedProc,SqlParameter parameters) SqlCommand cmd = this.buildCommand(storedProc,parameters); if(connection.State = ConnectionState.Closed) connection.Open(); cmd.ExecuteNon

30、Query(); connection.Close(); .4 實現(xiàn)數(shù)據(jù)庫調用的部分關鍵語句實現(xiàn)數(shù)據(jù)庫調用的部分關鍵語句 (1)更新汽車信息模塊的實現(xiàn),定義SQL數(shù)據(jù)參數(shù),運用UPDATE實現(xiàn)對于數(shù)據(jù) 的更新: public void updateMobile(string name,int price,int amount,string Description) SqlParameter parameters = new SqlParameter(aName,SqlDbType.Char,40), new SqlParameter(Price,SqlDbType.Int,4)

31、, new SqlParameter(Amount,SqlDbType.Int,4), new SqlParameter(Description,SqlDbType.Char,400) ; parameters0.Value = name; parameters1.Value = price; parameters2.Value = amount; parameters3.Value = Description; db.extProcedure(updateMobile,parameters);/opAutoMobile (2)實現(xiàn)將后臺的數(shù)據(jù)填充到DS中去,并且實現(xiàn)對于汽車信息的查詢,運用

32、SELECT語句進行數(shù)據(jù)的查詢: public DataSet MoblieTable() SqlConnection con = new SqlConnection(conStr); if(con.State = ConnectionState.Closed) con.Open(); string s = select * from AutoMobile; SqlCommand cmd = new SqlCommand(s,con); SqlDataAdapter da = new SqlDataAdapter(cmd); cmd.ExecuteNonQuery(); DataSet ds

33、= new DataSet(); da.Fill(ds,AutoMobile); con.Close(); return ds; (3)通過數(shù)據(jù)庫和前臺的連接,并且對于SqlDataReader中reader對象的更新,并 且根據(jù)其后的參數(shù)進行操作,實現(xiàn)對于客戶信息的回答: public string GetAnswer(int ID) string s = string.Empty;/ArrayList al = new ArrayList(); SqlParameter parameters = new SqlParameter(ID,SqlDbType.Int,4); parameter

34、s0.Value = ID; SqlDataReader reader = dbo.runProcedure(GetAnswer,parameters); if(reader.Read() s = Convert.ToString(readerAnswer); reader.Close(); return s; /opFQ (4)對于信息的添加,添加相關的參數(shù),對于新的參數(shù)的定義,通過存儲和構 造函數(shù)的調出來實現(xiàn): public void AddCase(int autoID,string custom,string ccomments,string ecomments) SqlParamet

35、er parameters = new SqlParameter(autoID,SqlDbType.Int,4), new SqlParameter(Custom,SqlDbType.Char,10), new SqlParameter(CComments,SqlDbType.Char,100), new SqlParameter(EComments,SqlDbType.Char,100); parameters0.Value = autoID; parameters1.Value = custom; parameters2.Value = ccomments; parameters3.Val

36、ue = ecomments; dbo.extProcedure(AddCase,parameters); /addCase /opCase #endregion (5)銷售人員登陸的實現(xiàn)過程,主要表現(xiàn)在先對銷售人員的一個參數(shù)定義,定 義ename和pwd兩個變量,并且通過對于Sqlparameter中reader中的對象進行傳遞,在 dbo.runProcedure中添加數(shù)據(jù)參數(shù),并實現(xiàn)整個過程: public Emploee Login(string pwd,string name) Emploee em = null; SqlParameter parameters = new SqlP

37、arameter(pwd,SqlDbType.Char,20), new SqlParameter(eName,SqlDbType.Char,10) ; parameters0.Value = pwd; parameters1.Value = name; SqlDataReader reader = dbo.runProcedure(Login,parameters); if(reader.Read() em = new Emploee(); em.ID = Convert.ToInt32(readerID); = name; em.Position = Convert.ToS

38、tring(readerPosition); em.Pwd = pwd; else em = new Emploee(); reader.Close(); return em; 5 5汽車銷售管理系統(tǒng)前臺模塊實現(xiàn)汽車銷售管理系統(tǒng)前臺模塊實現(xiàn) 5.15.1 模塊實現(xiàn)部分模塊實現(xiàn)部分:運行主登錄界面:運行主登錄界面 進入圖 5-1 進行,在這個可以進行汽車車型的閱覽和車型的查詢,對于用 戶來說這是一個展示汽車詳細信息的頁面,進入用戶登錄界面進行查詢??梢?在這個生成頁面里面,根據(jù)系統(tǒng)的語言通過第三方控件,在銷售人員我和客戶 直接搭建一個展示窗口,通過這個第三方控件實現(xiàn)汽車銷售系統(tǒng)的最初的展示, 并

39、且給與用戶更多的選擇信息。 整個系統(tǒng)主頁面實現(xiàn)以下幾個功能: 文件銷售人員登陸輸入用戶名和密碼登陸進行新車入庫更新。 SUV 汽車類型選擇購車類型點擊進入汽車信息界面選擇需要汽車。 顧客操作常見消費者問題輸入問題(暫時不能實現(xiàn)問題的回饋) 。 SUV 汽車類型選擇定購此車輸入相應的客戶選擇信息初步交易。 圖 5-1 汽車銷售系統(tǒng)主頁面 主頁面前臺代碼中用到的數(shù)據(jù)庫圖表(如圖 5-2): 圖 5-2 客戶信息圖 實現(xiàn)代碼如下: class Case public int ID = -1; public int autoID = -1; public string Custom = string.

40、Empty; public string CComments = string.Empty; public string EComments = string.Empty; class opCase DbObject dbo = null; private string conStr = server=D9J5732X;Integrated Security=SSPI;DataBase=SaleDB; public opCase() this.dbo = new DbObject(conStr); public void AddCase(int autoID,string custom,str

41、ing ccomments,string ecomments) SqlParameter parameters = new SqlParameter(autoID,SqlDbType.Int,4), new SqlParameter(Custom,SqlDbType.Char,10), new SqlParameter(CComments,SqlDbType.Char,100), new SqlParameter(EComments,SqlDbType.Char,100) ; parameters0.Value = autoID; parameters1.Value = custom; par

42、ameters2.Value = ccomments; parameters3.Value = ecomments; dbo.extProcedure(AddCase,parameters); /addCase /opCase 5.25.2 銷售人員登陸頁面銷售人員登陸頁面 在文件一覽進入銷售人員的登陸,進入后登陸,出現(xiàn)以上的界面,進行汽 車車型,型號,售價等等的更新和添加,對于銷售人員及時根據(jù)市場的需要進 行更新做好的條件??蛻艨梢栽谶@個銷售信息那一欄找到自己所需要的汽車類 型進行查詢和選擇,這樣更有利于銷售人員和客戶之間的交流。 圖 5-3 銷售人員登陸頁面 銷售信息實體在前臺代碼中實現(xiàn)的

43、圖表(如圖 5-4): 圖 5-4 銷售人員登陸圖 實現(xiàn)代碼如下: #region 雇員相關操作 class Emploee public int ID = -1; public string name = string.Empty; public string Position = string.Empty; public string Pwd = string.Empty; class opEmploee private DbObject dbo = null; private string conStr = server=D9J5732X;Integrated Security=SSPI

44、;DataBase=SaleDB; public opEmploee() dbo = new DbObject(conStr); public Emploee Login(string pwd,string name) Emploee em = null; SqlParameter parameters = new SqlParameter(pwd,SqlDbType.Char,20), new SqlParameter(eName,SqlDbType.Char,10) ; parameters0.Value = pwd; parameters1.Value = name; SqlDataRe

45、ader reader = dbo.runProcedure(Login,parameters); if(reader.Read() em = new Emploee(); em.ID = Convert.ToInt32(readerID); = name; em.Position = Convert.ToString(readerPosition); em.Pwd = pwd; else em = new Emploee(); reader.Close(); return em; #endregion 5.35.3 客戶管理服務客戶管理服務頁面頁面 通過對于客戶的需求進行分析

46、和總結,對于客戶相關問題的提出和解決, 深入的了解客戶的需求以及解決客戶存在的相關問題。對于不同的汽車類型的 選擇,根據(jù)不同的 F public int autoID = -1; public string Question = string.Empty; public string Answer = string .Empty; class opFQ private DbObject dbo; private string conStr = server=D9J5732X;Integrated Security=SSPI;DataBase=SaleDB; public opFQ() this

47、.dbo = new DbObject(conStr); public DataSet getFQTable() SqlConnection con = new SqlConnection(conStr); if(con.State = ConnectionState.Closed) con.Open(); string s = select * from FQ where State = -1; SqlCommand cmd = new SqlCommand(s,con); SqlDataAdapter da = new SqlDataAdapter(cmd); cmd.ExecuteNon

48、Query(); DataSet ds = new DataSet(); da.Fill(ds,AutoMobile); con.Close(); return ds; public void addQuesion(int autoID,string Question,string Answer) SqlParameter parameters = /new SqlParameter(ID,SqlDbType.Int,4), new SqlParameter(autoID,SqlDbType.Int,4), new SqlParameter(Question,SqlDbType.Char,20

49、0), new SqlParameter(Answer,SqlDbType.Char,400), new SqlParameter(State,SqlDbType.Int,4) ;/parameters0.Direction = ParameterDirection.Output; parameters0.Value = autoID; parameters1.Value = Question; parameters2.Value = Answer; parameters3.Value = -1; dbo.extProcedure(AddQuestion,parameters); /addQu

50、estion public ArrayList GetFQ(int autoID) ArrayList al = new ArrayList(); FQ f = null; SqlParameter parameters = new SqlParameter(autoID,SqlDbType.Int,4) ; parameters0.Value = autoID; SqlDataReader reader = dbo.runProcedure(GetFQ,parameters); while(reader.Read() f = new FQ(); f.ID = Convert.ToInt32(

51、readerID); f.Question = Convert.ToString(readerQuestion); al.Add(f); reader.Close(); return al; / getFQ public ArrayList GetAllFQ() ArrayList al = new ArrayList(); FQ f = null; SqlDataReader reader = dbo.runProcedure(GetAllFQ,null); while(reader.Read() f = new FQ(); f.ID = Convert.ToInt32(readerID);

52、 f.Question = Convert.ToString(readerQuestion); al.Add(f); reader.Close(); return al; /GETALLFQ public string GetAnswer(int ID) string s = string.Empty; /ArrayList al = new ArrayList(); SqlParameter parameters = new SqlParameter(ID,SqlDbType.Int,4) ; parameters0.Value = ID; SqlDataReader reader = db

53、o.runProcedure(GetAnswer,parameters); if(reader.Read() s = Convert.ToString(readerAnswer); reader.Close(); return s; /opFQ 5.45.4 客戶定購信息以及回饋客戶定購信息以及回饋頁面頁面 作為程序的開始,運行主頁面,進行銷售分析,了解客戶的需求,對于需 求進行市場采購,然后對于汽車信息以及客戶信息進行適時的更新,滿足客戶 的需要。在程序的整個運行過程中,進行適時的分析,在前臺加入了第三方控 件 ,對于在程序過程中的數(shù)據(jù)的更新,查詢,添加等都得到很好的實現(xiàn),并且 能夠按照客戶

54、信息進行交易. 在這個銷售系統(tǒng)中,進入主頁面以后,可以根據(jù)不同人的需求進行不同的 運行操作,通過點擊“左邊生成的相關汽車的文件夾” ,選擇你喜歡的汽車類型, 然后點擊“訂購此車” ,再根據(jù)我們的需求進行調取數(shù)據(jù)庫中的內容,獲得相關 汽車訂購消息,并且選擇,進行約定交易。 圖 5-7 預定汽車銷售頁面 在主頁面選擇汽車的信息以后,進入上下兩個界面進行交易的銜接,實現(xiàn) 客戶信息輸入和確認以及客戶要求的獲取,并在汽車服務的有限條件里獲取自 己想要的汽車類型,按照自己希望購買的汽車類型填寫詳細的汽車以及相關問 題,然后選擇客戶信息和客戶要求部分填寫,根據(jù)商家的承諾得到更多的相信 信息。 圖 5-8 銷

55、售人員回復客戶要求頁面 汽車信息實體在前臺代碼中的圖表(如圖 5-9): 圖 5-9 汽車信息圖 實現(xiàn)代碼如下: class autoMobile public int ID = 0; public string aName = string.Empty; public string Company = string.Empty; public int Cost = 0; public int Price = 0; public int Amount = 0; public string Description = 沒有任何的描述; /AutoMobile相關操作。 class opAutoM

56、obile private string conStr = server=D9J5732X;Integrated Security=SSPI;DataBase=SaleDB; private DbObject db; public opAutoMobile() db = new DbObject(conStr); public ArrayList getTitle() ArrayList al = new ArrayList(); autoMobile name = null; SqlDataReader reader = db.runProcedure(GetAuto,null); whil

57、e(reader.Read() name = new autoMobile(); name.ID = Convert.ToInt32(readerID); name.aName = Convert.ToString(readeraName); al.Add(name); reader.Close(); return al; public autoMobile getDetails(int ID) /ArrayList al = new ArrayList(); autoMobile details = null; SqlParameter parameters = new SqlParamet

58、er(autoID,SqlDbType.Int,4) ; parameters0.Value = ID; SqlDataReader reader = db.runProcedure(DisplayAuto,parameters); if(reader.Read() details = new autoMobile(); details.aName = Convert.ToString(readeraName); details.Company = Convert.ToString(readerCompany); details.Price = Convert.ToInt32(readerPr

59、ice); details.Description = Convert.ToString(readerDescription); reader.Close(); return details; /autoMobileo public DataSet MoblieTable() SqlConnection con = new SqlConnection(conStr); if(con.State = ConnectionState.Closed) con.Open(); string s = select * from AutoMobile; SqlCommand cmd = new SqlCo

60、mmand(s,con); SqlDataAdapter da = new SqlDataAdapter(cmd); cmd.ExecuteNonQuery(); DataSet ds = new DataSet(); da.Fill(ds,AutoMobile); con.Close(); return ds; public void AddautoMobile(string name,string company,int cost,int price,int amount,string description) SqlParameter parameters = new SqlParame

溫馨提示

  • 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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論