客戶資源管理系統(tǒng)_第1頁
客戶資源管理系統(tǒng)_第2頁
客戶資源管理系統(tǒng)_第3頁
客戶資源管理系統(tǒng)_第4頁
客戶資源管理系統(tǒng)_第5頁
已閱讀5頁,還剩34頁未讀 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、三門峽聃業(yè)鞍術(shù)曇枕 畢業(yè)設(shè)計(論文) 題目:客戶資源管理系統(tǒng) 姓名 學(xué)號 系部 專業(yè) 指導(dǎo)教師 目錄 中文摘要3 Abstract 3 第一章前言5 1. 1課題背景5 1.2國內(nèi)外發(fā)展5 1.3研究內(nèi)容5 1. 4研究意義5 第二章開發(fā)環(huán)境6 2.1開發(fā)平臺6 2.2開發(fā)工具6 2.3系統(tǒng)的配置(硬件、軟件要求)6 2.4數(shù)據(jù)庫技術(shù)7 2. 5 Access 的發(fā)展7 第三章系統(tǒng)分析與設(shè)計8 3. 1需求分析8 3.2數(shù)據(jù)庫設(shè)計8 3.3數(shù)據(jù)庫邏輯設(shè)計9 3. 4應(yīng)用程序設(shè)計10 3.4.2系統(tǒng)界面設(shè)計10 第四章系統(tǒng)實現(xiàn)11 4. 1系統(tǒng)編碼11 4. 2總體實現(xiàn)36 第五章總結(jié)與展望37

2、 5. 1總結(jié)37 5.2展望38 致謝38 參考文獻38 中文摘要 木系統(tǒng)為企業(yè)客戶信息管理系統(tǒng),通過該系統(tǒng),使企業(yè)的客戶管理工 作系統(tǒng)化、規(guī)范化、自動化,從而達到提高企業(yè)客戶管理效率的目的。采 用的開發(fā)匸具是Microsoft Visual Studio 2008。企業(yè)客戶管理系統(tǒng)能夠 對企業(yè)客戶基礎(chǔ)信息、客戶檔案瀏覽、客戶資料查詢、客戶資料統(tǒng)計、 日常記事、通訊錄、數(shù)據(jù)庫備份和還原及清空等進行管理。及時了解各個 環(huán)節(jié)中信息的變更。管理人員必須以管理員身份登錄,保證了系統(tǒng)的安全 性。系統(tǒng)的總體任務(wù)是使企業(yè)管理人員可以輕松快捷地完成對企業(yè)客戶管 理的任務(wù)。有利于提高管理效率。支持運行的環(huán)境:

3、Microsoft Window2000/XPo 關(guān)鍵詞:企業(yè)客戶信息管理、H常記事、通訊錄、系統(tǒng)管理 Abstract The system for the enterprise customer information management system, through the system, the enterprise customer management systematization, standardization, automation, customer management to improve enterprise efficiency Development too

4、l used is Microsoft Visual Studio 2008. Enterprise customer management systems to the enterprise customer base of information, customer profiles, browse, customer inquiries, customer statistics, daily notes, address book, database backup and restore and empty the other management. Timely information

5、 about changes in every aspect. Managers must Log ensure the security of the system Systems overall mission is to make corporate managers can quickly and easily complete the task of enterprise customer management. Help improve management efficiency Support the environment: Microsoft Window2000/XP. K

6、eywords: administrative, daily summary record, address book, System management 第一章前言 1. 1課題背景 轉(zhuǎn)眼間三年的高校生活就要結(jié)束了,最后的一個任務(wù)就是做一個畢業(yè)設(shè)訃,根據(jù) 我在潔駒汽車服務(wù)有限公司的工作需要,結(jié)合自己所學(xué)的專業(yè)知識以及平時所做的作 品和參考的資料,決定著手做一個基于C#的企業(yè)客戶信息管理系統(tǒng)作為畢業(yè)設(shè)計作品。 通過Visual Studio 2008來實現(xiàn)美觀的界面,利用C#語句來編寫語句,并用access 自動連接實現(xiàn)數(shù)據(jù)庫動態(tài)更新功能,通過這種連接方式,讓整個系統(tǒng)能夠完整的實現(xiàn) 所需要的

7、功能。通過這個設(shè)計,讓我自己能夠多充實點知識,也便于順利的完成工作 任務(wù)。 1- 2國內(nèi)外發(fā)展 隨著Internet的飛速發(fā)展,更新?lián)Q代越來越頻繁,人類已進入網(wǎng)絡(luò)計算和數(shù)字化時代, 通過計算機管理軟件對企業(yè)進行管理,管理更多的客戶信息,快捷而方便的讓管理員 能在最快的時間里找到、修改、保存自己所需要的相關(guān)信息。讓更多的企業(yè)對自己客 戶的管理更加規(guī)范、快速、方便。 1- 3研究內(nèi)容 首先,我需要把企業(yè)客戶管理系統(tǒng)需要來判斷該系統(tǒng)所需要實現(xiàn)的功能,再根據(jù) 功能需要制定一個清單將軟件U標(biāo)詳細(xì)地有條理地羅列出來,再通過c#來實現(xiàn)這些菜 單的功能,并將各個菜單有機地鏈接為一個整體。 其次,通過一些圖片和

8、字體的美化,讓整個界面看上去比較美觀。把各種需要的 表單、菜單和主程序都給建立好。 最后,通過C#和acces將各個功能連接和實現(xiàn)。 對于這次設(shè)計的內(nèi)容,主要是掌握C#和數(shù)據(jù)庫的編程信息,通過編程的語句實現(xiàn) 控件和表、菜單之間的連接,有效的完成設(shè)計。 1. 4研究意義 企業(yè)是一個生產(chǎn)、管理的集散地,生產(chǎn)資料和企業(yè)客戶資料繁多,包含很多信息 數(shù)據(jù)的管理。在過去的企業(yè)中用書面管理信息,在修改、查詢、添加企業(yè)客戶信息方 面都沒有很好的發(fā)揮它的效益,企業(yè)客戶資料管理復(fù)雜、工作量大比較突出,不能利 用多種途徑查詢企業(yè)客戶資料,修改后不能同步更改所有檔案資料。這就是企業(yè)客戶 管理系統(tǒng)開發(fā)的基本環(huán)境。 設(shè)計

9、處理查詢方式單一,添加不能與統(tǒng)計同步,出錯率高,出錯后不易更改。由 于信息比較多,企業(yè)客戶信息管理比較混亂;一般客戶情況是記錄的,資料的數(shù)H和 內(nèi)容記錄在文件中,資料室的工作人員和管理人員也只能當(dāng)時比較清楚,時間一長, 如再有進行查詢,查找了造成查詢費時,費力。如果對很長時間以前的資料進行更改 就更加困難了。 基于此類問題,我認(rèn)為有必要建立一個企業(yè)客戶管理系統(tǒng),使資料管理工作規(guī)范 化,程序化,避免資料管理隨意性,提高信息處理的速度和準(zhǔn)確性,能夠及時、準(zhǔn)確、 有效的查詢、修改和保存資料情況。 第二章開發(fā)環(huán)境 2.1開發(fā)平臺 考慮到本系統(tǒng)的性能要求,和現(xiàn)有的條件,我選擇了 WINDOWS XP中文

10、版作為開發(fā)、 測試和運行的平臺。因為WINDOWS操作系統(tǒng)是H前應(yīng)用最廣的操作系統(tǒng),它以全新的 圖形界面,簡單快捷的操作方式,支持多媒體功能等特點而成為軟件發(fā)展的流行趨勢, 選用它作為開發(fā)平臺,易于功能的擴展和軟件升級。 2.2開發(fā)工具 針對U前世界上流行的大量軟件和開發(fā)工具,經(jīng)過認(rèn)真分析其優(yōu)缺點并根據(jù)平時 所學(xué)的知識,結(jié)合企業(yè)客戶管理系統(tǒng)的需要和U前的硬件環(huán)境,我選用微軟WINDOWS 平臺下的Visual Studio 2008 (簡寫為VS 2008)作為軟件開發(fā)工具。選用該工具有 發(fā)下兒方面的優(yōu)點: (1)VS 2008是前微機上較優(yōu)秀的軟件開發(fā)系統(tǒng)軟件,是一個集成環(huán)境開發(fā)的 軟件,其

11、編程語言C#與C語言較為相似,它具有友好的可視化環(huán)境,整合的源代碼編 輯器、編譯器、調(diào)試器和資源編輯器,開發(fā)人員可利用插件模式、面向?qū)ο蟮某绦蛟O(shè) 計方法整合各種開發(fā)工作,大大簡化了應(yīng)用系統(tǒng)的開發(fā)過程,并提高了系統(tǒng)工程的模 塊化和緊湊性。 (2)VS 2008工具箱中提供了大量的諸如“容器J “菜單和工具欄”、“數(shù)據(jù)二“媒 體J “打印”、“對話框”等控件,在服務(wù)器資源管理器中提供了快速的數(shù)據(jù)庫連接以及 創(chuàng)建,使以往費時費力的開發(fā)工作變得輕松自如。這些可視化的設(shè)計工具免除了開發(fā) 者編寫大量程序代碼的工作。 2.3系統(tǒng)的配置(硬件、軟件要求) CPU: Pentium 4 3. 0 以上。 內(nèi)存:

12、512MB以上。 硬盤:80GB以上。 顯示器:1024X768像素以上。 數(shù)據(jù)庫:Access2000以上。 操作系統(tǒng):Windows XP或更高版本。 2-4數(shù)據(jù)庫技術(shù) Access是一種關(guān)系型數(shù)據(jù)庫管理系統(tǒng),是的組成部分之一。Accessl. 0誕生于20 世紀(jì)90年代初期,H前Access2003已經(jīng)得到廣泛使用。歷經(jīng)多次升級改版,其功能 越來越強大,但操作反而更加簡單。尤其是Access與Office的高度集成,風(fēng)格統(tǒng)一 的操作界畫使得許多初學(xué)者更容易掌握。 Access應(yīng)用廣泛,能操作其他來源的資料,包括許多流行的PC數(shù)據(jù)庫程序(如 DBASEParadoxFoxPro)和、小型機

13、及大型機上的許多SQL數(shù)據(jù)庫。此外,Access 還提供的高級應(yīng)用系統(tǒng)。Access與其它數(shù)據(jù)庫開發(fā)系統(tǒng)比較有一個明顯的區(qū)別:用戶 不用編寫一行代碼,就可以在很短的時間里開發(fā)出一個功能強大且相當(dāng)專業(yè)的數(shù)據(jù)庫 應(yīng)用程序,并且這一過程是完全可視的,如果能給它加上一些簡短的VBA代碼,那么 開發(fā)出的程序就與專業(yè)潛心開發(fā)的程序一樣。 2.5 Access的發(fā)展 Access數(shù)據(jù)庫系統(tǒng)既是一個關(guān)系數(shù)據(jù)庫系統(tǒng),還是設(shè)計作為Windows圖形用戶界 面的應(yīng)用程序生成器。它經(jīng)歷了一個長期的發(fā)展過程。 Microsoft公司在1990年5月推出Windows3. 0以來,該程序立刻受到了用戶的歡 迎和喜愛,19

14、92年11月Microsoft公司發(fā)行了 Windows數(shù)據(jù)庫關(guān)系系統(tǒng)Accessl. 0 版本。從此,Access不斷改進和再設(shè)計、自1995年起,Access成為辦公軟件0ffice95 的一部分。多年來,Microsoft先后推出過的Access版本有2.0、7.0/95、8.0/97、 9.0/2000、10. 0/2002,直到今天的 Access2003、2007 版。 中文版 Access2003 具有和 0ffice2003 中的 Word2003、Excel2003、 Powerpoint2003等相同的操作界面和使用環(huán)境,具有直接連接Internet和Intranet 的功

15、能。它的操作更加簡單,使用更加方便。 Access的最主要優(yōu)點是它不用攜帶向上兼容的軟件。無論是對于有經(jīng)驗的數(shù)據(jù)庫 設(shè)計人員還是那些剛剛接觸數(shù)據(jù)庫管理系統(tǒng)的,都會發(fā)Access所提供的各種匸具既非 常實用又非常方便,同時還能夠獲得高效的數(shù)據(jù)處理能力。 Access優(yōu)點明顯:具有方便實用的強大功能,Access用戶不用考慮構(gòu)成傳統(tǒng)PC 數(shù)據(jù)庫的多個單獨的文件;可以利用各種圖例快速獲得數(shù)據(jù);可以利用報表設(shè)汁丄具, 非常方便地生成漂亮的數(shù)據(jù)報表,而不需要釆用編程;釆用OLE技術(shù)能夠方便地創(chuàng)建 和編輯多媒體數(shù)據(jù)庫,其中包括文本、聲音、圖像和等對象:支持ODBC的SQL數(shù)據(jù)庫 的數(shù)據(jù);設(shè)計過程自動化,提

16、高了數(shù)據(jù)庫的工作效率;具有較好的集成開發(fā)功能;可 以釆用VBA( Application)編寫數(shù)據(jù)庫應(yīng)用程序;提供了包括斷點設(shè)置、單步執(zhí)行等 調(diào)試功能;能夠像Word那樣自動進行語法檢査和錯誤診斷;進一步完善了將 Internet/Intranet集成到整個辦公室的桌面操作環(huán)境。 總之,Access發(fā)展到現(xiàn)在已經(jīng)向用戶展示出它的易于使用和功能強大的特性。 第三章系統(tǒng)分析與設(shè)計 3.1需求分析 本系統(tǒng)用于企業(yè)的客戶資料管理。主要任務(wù)是用計算機對企業(yè)客戶進行日常管理, 如企業(yè)客戶信息的添加、刪除、修改、查詢,以及企業(yè)客戶信息的統(tǒng)計和打印等。該 系統(tǒng)包含三種基本信息:企業(yè)客戶基礎(chǔ)信息、日常記事、家庭

17、住址和服務(wù)情況,還可 根據(jù)需要對其進行信息更新,包括對企業(yè)客戶資料進行添加、修改和刪除,對日常記 事和通訊錄信息進行添加、修改、刪除等操作、查詢等。能進行多條件的企業(yè)客戶信 息查詢的查詢。 (1)統(tǒng)計。按多條件對企業(yè)客戶的信息查詢后,能進行按企業(yè)員工不同信息的統(tǒng)計 等。 (2)數(shù)據(jù)庫操作。能對數(shù)據(jù)庫數(shù)據(jù)進行保存、數(shù)據(jù)清除以及數(shù)據(jù)存儲轉(zhuǎn)換操作。 (3)其他操作。能在必要的時候調(diào)用其他工具(如可調(diào)用記事本)。 通過以上分析,企業(yè)客戶管理系統(tǒng)有基礎(chǔ)信息管理模塊、客戶管理模塊、備忘記錄、 數(shù)據(jù)庫模塊組成。 3.2數(shù)據(jù)庫設(shè)計 數(shù)據(jù)庫設(shè)計是應(yīng)用系統(tǒng)開發(fā)的一個重要環(huán)節(jié),數(shù)據(jù)庫結(jié)構(gòu)的好壞將直接對應(yīng)用系 統(tǒng)的效

18、率及實現(xiàn)結(jié)果產(chǎn)生重要影響。在數(shù)據(jù)庫設(shè)計的開始階段應(yīng)盡量全面考慮用戶的 各種需求,收集基礎(chǔ)數(shù)據(jù)、數(shù)據(jù)結(jié)構(gòu)及數(shù)據(jù)處理流程。根據(jù)需求分析,企業(yè)客戶管理 系 統(tǒng) 的 數(shù) 據(jù) 流 程 圖 如 圖 31 所 示: 企業(yè)客戶信息管理系統(tǒng) 圖3. 1數(shù)據(jù)流程圖 企業(yè)客戶管理系統(tǒng)的 E-R 圖如圖 3.2 所示: 企業(yè)客戶資料 圖3.2 E-R模型圖 3.3數(shù)據(jù)庫邏輯設(shè)計 本系統(tǒng)數(shù)據(jù)庫 各數(shù)據(jù)庫表的結(jié)構(gòu)如下圖所示: ID| userllame userNum userAutoNwn userAddress userService user Menu 朱玉蘭 JJ001 滬J5467 南斑殖格林亦曉5 良好 垂度

19、套髓(36071 (目動編號) 表 tbAdmin ID .djTiirJffanie adnriirtP as sword 1 adni i n 1Z3456 2 ! zouwei 123456 米 自動編號) 表 tbUserlnfo 3.4應(yīng)用程序設(shè)計 34. 1總體設(shè)計 企業(yè)客戶管理系統(tǒng)的總體結(jié)構(gòu)圖如圖3. 26所示: 客戶信息登錄 3.4.2系統(tǒng)界面設(shè)計 用戶登錄窗口界面是用戶看到的第一幅畫面,也是進入系統(tǒng)之前必須經(jīng)過的一道 “關(guān)口”。因此,簡潔、實用、友好是設(shè)計時應(yīng)當(dāng)考慮到的風(fēng)格。登錄本系統(tǒng),用戶將 看到如圖3. 27所示: 圖3. 27登錄界面 本系統(tǒng)注重用戶的權(quán)限的限制,當(dāng)用戶

20、名或密碼輸入錯誤時,要求用戶再次輸 入用戶名和密碼。進行系統(tǒng)的主畫面屏幕區(qū)域設(shè)計時,考慮是汽車服務(wù)公司,因此 選擇的圖片都是能夠突出特點的個性化設(shè)計,同時當(dāng)打開登陸界面是會自動播放動 聽的背景音樂。 10 第四章系統(tǒng)實現(xiàn) 4.1系統(tǒng)編碼 1.用戶登錄 盲息管理彳 圖41用戶登錄界面 (2) 功能及設(shè)計說明 在該界面中,當(dāng)用戶輸入用戶名和密碼后,程序?qū)膖bAdmin表中進行查找,如 果找到,將判斷該用戶的權(quán)限,從而調(diào)出相應(yīng)的操作權(quán)限供用戶操作。 (3) 代碼 登錄按鈕的Click代碼如下: FormLogin : Form /private bool res = false; OleDbCon

21、nection con; OleDbDataReader thread; FormLoginO InitializeComponent (); buttonClose_Click( sender, EventArgs e) Application. Exit (); 11 buttonOk_Click( sender, EventArgs e) get Con (); tbread Read(); pw = thread GetVdlue (0). ToStringO ; (pw = textBoxPW. Text) ClassAdminName. adminName = textBoxame

22、.Text; Close (); MessageBox. Show(密碼錯誤!提示 MessageBoxButtons OK); MessageBox. Show(“用戶不存在! “,提示, MessageBoxButtons. OK); con. Close (); OleDbDataReader getCon () /創(chuàng)建連接數(shù)據(jù)庫的字符串 ConStr = zzProvider=Microsoft. Jet. OLEDB. 4. 0;Data source=Provider=Microsoft Jet OLEDB. 4. 0;Data Source二dbJJCRM mdb; con =

23、OleDbConnection(ConStr); 對數(shù)據(jù)庫進行查詢操作 sql = select adminPassword from tbAdmin where adminName = + textBoxName. Text + OleDbCommand cmd = OleDbCommand(sql, con); con. 0pen(); 12 thread = cmd. ExecuteReader () ;/讀取數(shù)據(jù) thread; MessdgeBox. Show(連接錯誤! ”、提示,MessageBoxButtons. OK); 2. 顯示界面 (1) 系統(tǒng)顯示界面設(shè)訃如圖4. 2所

24、示: 圖42顯示界面 (2) 功能及設(shè)計說明: 顯示用戶界面主要是為了方便用戶對所有的客戶信息有個整體的了解和直觀的掌 握,無需搜索,只要點擊顯示所有客戶,系統(tǒng)便會自動將所保存的所有客戶信息資料 詳細(xì)的顯示在上圖對話框中。 (3) 代碼: public partial class FormView : Form 13 private OleDbConnection con; private OleDbDataResder thread; /int row = 0; public FormView() InitializeComponent(); private void FormView_Lo

25、ad(object sender, EventArgs e) getCon (); listViewViewA 11. Items Clear (); try while (thread ReadO) ListViewItem lvi = new ListViewItem (thread GetValue (1). ToStringO); lvi SubIterns Add(thread GetValue(2) ToString (); lvi. SubIterns Add(thread GetValue(3) ToString(); lvi. SubIterns Add(thread Get

26、Value(4) ToString(); lvi. SubIterns Add(thread GetValue(5) ToString(); lvi. SubIterns Add(thread GetValue(6) ToString(); listViewViewAll. Items. Add(lvi); catch Mess鷗eBox. Show(“暫時沒有數(shù)據(jù)! “,提示, MessageBoxButtons OK); con. Close (); public 01eDbDataReader getCon() try string ConStr = Provider二Microsoft

27、 .Jet .0LEDB .4.0;Ddta 14 source=Provider=Microsoft Jet OLEDB 4. 0;Data Source二dbJJCRM mdb; con = new OleDbConnection(ConStr); string sql = select * from tbUserlnfo; OleDbCommand cmd = new OleDbCommand(sql, con); con. Open(); thread = cmdExecuteReader(); return thread; catch MessageBox. Show(“連接錯誤!、

28、提示,MessageBoxButtons. OK); return null; 3 主界面 (1)系統(tǒng)主界面設(shè)汁如圖43所示: 圖4.3系統(tǒng)主界面 (2)功能及設(shè)計說明 該主界面主要實現(xiàn)了整個系統(tǒng)操作功能的調(diào)用操作,并且顯示當(dāng)前的登錄用戶 名,另外還自動播放播放背景音樂。在幫助菜單中有對該系統(tǒng)的操作說明以及關(guān)于程 序的信息。 (3)主要事件代碼如下: FormMain : Form FormMain () 15 InitializeComponent (); /隱藏此窗體,并顯示登入窗體 Hide (); FormLogin fl = FormLogin(): fl. ShowDialogO

29、; FormMain_Load( sender, EventArgs e) /在公司名稱下顯示歡迎該用戶 labelWelcom. Text =歡迎:+ ClassAdminName adminanie; buttonViewAll_Click( sender, EventArgs e) FormView fv = FormView(); fv. MdiParent =; fv. Show (); buttonSearch_Click( sender, EventArgs e) FormSearch fs = FormSearch(); fs.M diParent =; fs. Show();

30、 buttonAdd_Click( sender, EventArgs e) FormAdd fa = FormAdd(); fa. MdiParent =; fa. Show (); buttonUpdate_Click( sender, EventArgs e) FormUpdate fu = FormUpdate(); fu. MdiParent =; fu. Show (); buttonExit_Click( sender, EventArgs e) 16 Application. Exit (); buttonDelete_Click( sender, EventArgs e) F

31、ormDelete fd = FormDelete(); fd.MdiParent 二; fd. Show (); buttonl_Click( sender, EventArgs e) AboutBoxl aboutbox = AboutBoxl(); aboutbox ShowDialogO ; button2_Click( sender, EventArgs e) System Diagnostics Process Start(notepad exe); button3_Click( sender, EventArgs e) Forml forml = Forml(); form 1.

32、 ShowDialogO ; 4.搜索用戶 (l) 搜索用戶界面如圖44所示: 17 圖44客戶信息搜索 (2) 功能及設(shè)計說明: 當(dāng)用戶想針對某個客戶信息進行了解時,只要通過系統(tǒng)就可以快速查找到相關(guān)信 息,為了方便本系統(tǒng)設(shè)計了兩種條件進行搜索,一是通過客戶名來搜索,主要針對本 公司的所有客戶設(shè)計的,二是通過會員卡號來進行搜索,通過這種搜索方式可以巧妙 的避免難題,就是當(dāng)出現(xiàn)同名同姓的客戶時這種方法可以大大加強信息的準(zhǔn)確性,通 過這兩種方式搜索操作起來非常方便和人性化,當(dāng)輸入錯誤時,可以點擊“重置”然 后再重新進行輸入即可,輸入完畢后點擊“搜索”系統(tǒng)就會自動根據(jù)條件進行搜索了, 如果搜索到了就

33、會自動將客戶信息顯示在下方的列表中。這樣就可以方便用戶的工作 To (3) 代碼: partial class FormSearch / summary) / Required designer variable / /summary) private System. ComponentMode1IContainer components = null: / summary) / Clean up any resources being used / / true if managed resources should be disposed; otherwise, false protect

34、ed override void Dispose(bool disposing) if (disposing base Dispose(disposing); 18 #region Windows Form Designer generated code / summary) / Required method for Designer support - do not modify / the contents of this method with the code editor / private void InitializeComponent() this groupBoxSearc

35、h = new System Windows Forms GroupBox(); thisbuttonClear = new System. WindowsFormsButton(); thisbuttonSearch = new System .WindowsFormsButton(); this textBoxSearch = new System Windows Forms TextBoxO; this:r3dioButtonunibe:rSe3i?ch = new System Windows Forms RadioButton (); thisradioButtonameSearch

36、 = new System Windows Forms RadioButton(); this.1istViewView = new System. WindowsFormsListView(); this columnHeaderl = this columnHeader2 = this columnHeader3 = this columnHeaderd = this columnHeader5 = this columnHeader6 = new System. Windows, new System. Windows, new System. Windows, new System.

37、Windows, new System Windows, new System Windows. Forms ColumnHeader(); Forms ColumnHeader(); Forms ColumnHeader(); Forms ColumnHeader(); Forms ColumnHeader(); Forms ColumnHeader(); this groupBoxSearch SuspendLayout(); this SuspendLayout(); / / groupBoxSearch / this groupBoxSearch Controls Add(this b

38、uttonClear); this groupBoxSearch Controls Add(this buttonSearch); this groupBoxSearch Controls Add(this textBoxSearch); this groupBoxSearch Controls Add(this radioBu11onXumberSearch); this groupBoxSearch Controls Add(this radioButtonXameSearch); this groupBoxSearch Dock = System Windows Forms DockSt

39、yle Top; this groupBoxSearch Location = new System Drawing Point(0, 0); this .groupBoxSearch= groupBoxSearch; this groupBoxSearch Size = new System. Drawing Size(531, 107); this .groupBoxSearchTablndex = 1; this .groupBoxSearchTabStop = false; this. groupBoxSearch. Text =搜索用戶; this.groupBoxSearch.En

40、ter +二 new System EventHandler(this groupBoxSearch_Enter); / 19 / buttonClear / thisbuttonClear .Location = new System. Drawing .Point(402, 58); thisbuttonClear anie = buttonClear; thisbuttonClear.Size = new System. Drawing .Size(75, 23); thisbuttonClearTabindex = 4; this. buttonClear. Text =重置; thi

41、sbuttonClearUseVisualStyleBackColor = true; thisbuttonClear.Click +二 new System EventHandler(this buttonClear_Click); / / buttonSearch / this buttonSearch Location = new System. Drawing Point (402, 30); thisbuttonSearch= buttonSearch; thisbuttonSearch .Size = new System .Drawing .Size(75, 23); thisb

42、uttonSearchTabindex = 3; this. buttonSearch. Text =搜索; thisbuttonSearchUseVisualStyleBackColor = true; thisbuttonSearch .Click += new System EventHandler(this buttonSe3rch_Click); / / textBoxSearch / this textBoxSearch Location = new System. Drawing Point(171, 46); this .textBoxSearch= textBoxSearch

43、; this .textBoxSearch .Size = new System. Drawing .Size(195, 21); thistextBoxSearchTablndex = 2; / / radioButtonNumberSearch / thisradioButtonNumberSearchAutoSize = true; thisradioButtonYumberSearch .Location = new System Drawing Point(47, 65); thisradioButtonNumberSearch= radioButtonNumberSearch; t

44、his radioButtonNumberSearch Size = new System. Drawing Size(107, ; this radioButtonuniberSearch Tablndex = 1; this radioButtonuniberSearch TabStop = true; this. radioButtonNumberSearch. Text =按會員卡號搜索; thisradioButtonumberSearchUseVisualStyleBackColor = true; / / radioButtonNameSearch / thisradioButt

45、onameSearchAutoSize = true; 20 thisradioButtonameSearch .Location = new System. Drawing Point (47, 30); this radioButtonameSearch anie = /zradioButtonNameSearch/z; thisradioButtonameSearch .Size = new System. Drawing .Size(107, ; this radioButtonanieSearch Tdblndex = 0; this radioButtonanieSearch Td

46、bStop = true; this. radioButtonNameSearch. Text =按客戶名稱搜索; thisradioButtonameSearchUseVisualStyleBackColor = true; / / listViewView / thislistViewView Columns AddRange (new System Windows Forms ColumnHeader this columnHeaderl, this columnHeader2, this columnHeader3, this columnHeader4, this columnHea

47、der5, this columnHeader6); this listViewView. Dock = System. Windows Forms DockStyle Bottom; this.1istViewView. FullRowSelect = true; this .1istViewViewGridLines = true; thislistViewView. Location = new System. Drawing Point(0, 108); this, listViewYiew. Name = listViewView; this .1istViewView. Size

48、= new System. Drawing .Size(531, 132); this.1istViewView. Tabindex = 0; this .1istViewViewUseCompdtibleStdtelmageBehavior = false; thislistViewView. View = System Windows Forms View. Details; / / columnHeaderl / this. columnHeaderl. Text = 客戶姓名; this.columnHeader1. Width = 70; / / columnHeader2 / th

49、is. columnHeader2. Text =會員卡號; this columnHe3de:r2 .Width = 72; / / columnHeader3 / this. columnHeader3. Text =車牌號碼; t his columnHeade:r3 .Width = 88; / / columnHeader4 / this. columnHeader4. Text = 聯(lián)系地址; thiscolumnHeader4. Width = 134 ; / / columnHeader5 / this. columnHeader5. Text = 服務(wù)情況; this col

50、umnHeade:r5.Width = 81: / / columnHeader6 / this. columnHeader6. Text =套餐類型; this columnHe3de:r6.Width = 76; / / FormSearch / thisAutoScaleDimensions = new System .DrawingSizeF(6F, 12F); this AutoScaleMode = System. Windows Forms AutoScaleMode Font; thisClientSize = new System. Drawing .Size(531, 24

51、0); this Controls Add(thislistViewView); this Controls Add(this groupBoxSearch); this= FormSearch; this. Text =搜索用戶; this .Load +二 new SystemEventHandler(thisFormSearchLoad); this groupBoxSearch ResumeLayout(false); this groupBoxSearch PerformLayout(); this ResumeLayout(false); Sendregion private Sy

52、stem.WindowsFormsGroupBox groupBoxSearch; private System .WindowsForms .Button buttonClear; private System. WindowsForms .Button buttonSearch; private System. WindowsFormsTextBox textBoxSearch; private System Windows Forms RadioButton radioButtonNumberSearch; private System Windows Forms RadioButton

53、 radioButtonXameSearch; private System .WindowsFormsListView listViewView; private System Windows Forms ColumnHeader columnHeaderl; private System. Windows. Forms. ColumnHeader columnHeader2; private System. Windows. Forms. ColumnHeader columnHeader3; private System. Windows. Forms. ColumnHeader col

54、umnHeader4: private System. Windows. Forms. ColumnHeader columnHeader5; 22 private System. Windows. Forms. ColumnHeader columnHeader6; 5 添加用戶 (1) 添加用戶系統(tǒng)界面如圖4. 5所示: 圖45添加用戶信息界面 (2) 功能及設(shè)計說明: 當(dāng)有新的客戶信息需要立即添加到系統(tǒng)中去以方便客戶信息的科學(xué)有效地管理, 即使更新等工作的開展,因此作為客戶信息管理系統(tǒng)添加客戶信息的功能非常重要, 本系統(tǒng)當(dāng)然也不例外,當(dāng)藥加入新的客戶信息時,我們只要將相關(guān)的客戶信息填寫完

55、 畢主要包括客戶姓名、會員卡號、車牌號碼、聯(lián)系地址、服務(wù)情況、套餐類型等,本 系統(tǒng)對所有客戶都釆取姓名和卡號雙重登記的管理模式,以便搜索起來方便,而且也 可以巧妙的避免了同名同姓的客戶給管理帶來的麻煩。 (3) 代碼: FormAdd : Form 01eDbConnection con; FormAdd () Initiali zeComponent (); 23 FormAdd_Load( sender, EventArgs e) buttonOk_Click( sender, EventArgs e) (getCon 0) MessageBox. Show(z,添加成功!,提示, Mes

56、sageBoxButtons. OK): buttonClear_Click(sender, e); MessageBox. Show(添加失敗!,提示”,MessageBoxButtons. OK); buttonClear_Click( sender, EventArgs e) textBoxName .Text = “; textBoxum. Text = ”; textBoxAutoum. Text = “; textBoxAddress.Text 二“; textBoxService.Text = “; textBoxMenu. Text = “; Boolean getCon ()

57、 ConStr = Provider二Microsoft. Jet. OLEDB. 4. 0;Data source=Provider=Microsoft Jet OLEDB 4. 0;Ddta Source二dbJJCRM mdb; con = OleDbConnection(ConStr); sql = insert into tbUserinfo (userName, userNum, userAutoNum, userAddress, userService, userMenu) values C + textBoxame Text + + textBoxNum. Text + + t

58、extBoxAutoNum Text + ,+ textBoxAddress. Text + + textBoxService. Text + + textBoxMenu. Text +; OleDbCommand cmd = OleDbCommand(sql, con); con. 0pen(); cmd ExecuteNonQuery(); 24 6.修改用戶 (1) 修改用戶界面如圖4. 6所示: 圖4. 6修改用戶界面 (2) 功能及設(shè)計說明: 修改用戶信息功能主要是針對客戶信息的變動來設(shè)計的,比如聯(lián)系地址、服務(wù)情況或 套餐類型的變動,我們都會重新進行登記,及時更新以便做好對客戶信息的

59、有效管理, 再實現(xiàn)該步驟的時候要先進行搜索,因此是修改對搜索功能延伸,搜索到了原先的客 戶信息之后進行重新登記,然后點擊“確定”按鈕就可以將客戶信息進行保存了。 (3) 代碼: FormUpdate : Form id 二“; OleDbConnection con; 01eDbDataReader thread; FormUpdate () 25 Initiali zeComponent (); FormUpdate_Load( sender, EventArgs e) buttonSearch_Click( sender, EventArgs e) getCon (); thread Re

60、ad(); id = thread GetVdlue (0). ToStringO ; textBoxName. Text = threadGetValue(1). ToStringO; textBoxNum. Text 二 threadGetValue(2) ToStringO : textBoxAutoNum. Text = threadGetValue(3)ToStringO: textBoxAddress .Text = thread .GetValue (4). ToString (); textBoxService .Text = thread .GetValue(5)ToStri

溫馨提示

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

評論

0/150

提交評論