【正文】
①選擇庫存表; ②獲取輸入貨號信息; ③設(shè)置過濾條件; ④顯示結(jié)果。 輸出:無。 程序清單: *選擇庫存表 select 4 private hh set exact off hh=() set filter to 庫存表 .貨號 =alltrim(hh) 27 go bottom go top browse (2)Command2中的 Click事件 功能:按客戶代碼進行客戶信息 查詢,并顯示。 輸入 : 無。 處理: ①選擇客戶信息表; ②獲取輸入貨號信息; ③設(shè)置過濾條件; ④顯示結(jié)果。 輸出:無 程序清單: *選擇客戶信息表 select 3 private dm set exact off dm= () set filter to 客戶信息表 .客戶代碼 =alltrim(dm) go bottom go top browse (3)Command3中的 Click事件 功能:顯示所有采購入庫記錄。 程序清單: *選擇進貨表 select 1 brow (4)Command4中的 Click事件 功能: 顯示所有銷售出庫記錄。 程序清單: *選擇售貨表 Select 2 brow 28 打印 模塊 1.模塊描述 在主窗體中,單擊打印選項,就會調(diào)用庫存信息報表。 2.窗體和源文件定義 窗體名稱:報表 frtHwList 文件名: frtHwList 數(shù)據(jù)環(huán)境: 庫存表 .dbf 報表 frtHwList中主要實現(xiàn)域控件與庫存表之間每一個字段的關(guān)聯(lián) 。 登錄管理 模塊 為了實現(xiàn)管理員功能,在本系統(tǒng)中設(shè)計了一個用戶登錄界面和管理員修改口令界面。在登錄界面中,用戶可以輸入用戶名稱和密碼,單擊“確認” 按鈕之后登陸系統(tǒng);在管理員修改口令界面中,用戶可以在輸入需要修改的用戶名稱和密碼后,進行密碼的修改。 2.窗體和源文件定義 窗體名稱:表單 frmLogin和表單 frmPassword 文件名: 、 數(shù)據(jù)環(huán)境: 無 (見表 11和 12) 表 11 用戶登錄 表單中的對象設(shè)置 對 象 屬性 值 說明 Form1 Caption 用戶登錄 Label1 Caption 歡迎使用倉庫管理系統(tǒng) Label4 Caption 請輸入用戶名稱和密碼 Label2 Caption 用戶名稱: Label3 Caption 密碼: Command1 Caption 確定 Command2 Caption 取消 29 表 11 用戶登錄 表單中的對象設(shè)置 對象 屬性 值 說明 Form1 Caption 修改登錄密碼 Label7 Caption 修改管理員密碼 Label1 Caption 輸入登錄 ID Label2 Caption 再次輸入確認: Label3 Caption 輸入登錄密碼: Label4 Caption 再次輸入確認: Command1 Caption 確定 Command2 Caption 取消 ( 1) frmLogin中 Command1的 Click事件 功能:驗證輸入的用戶名和密碼 是否正確,如果數(shù)據(jù)庫中存在輸入的用戶名和密碼信息,則調(diào)用主窗口,否則提示輸入錯誤信息 。 程序清單: *選擇 用戶 信息 表 select 5 select 管理員 ID,密碼,管理員名稱 from 用戶表 where 管理員 id=allt() and 密碼 =allt() into array demo if demo[1]=‘ .F.’ = messagebox(‘ 登錄 ID或密碼錯誤!’, 0+16+0,‘提示’ ) else *登錄成功則調(diào)用主題窗 do form frmMain endif (2) frmLogin中 Command2的 Click事件 功能: 釋放當前窗體 。 *選擇客戶信息表 clear event (3) frmPassword中 Command1的 Click事件 功能: 完成對指定用戶名的賬號信息的密碼修改操作 。 30 程序清單: use admininfo store allt() to adminname store allt() to adminPassword * if = and 。 = locate for gly_name=adminname update admininfo set mm=adminPassword =messagebox(‘ ID 和密碼修改成功! ’ , 0+64+0,‘信息’ ) else =messagebox(‘ ID或密碼驗證不統(tǒng)一,請重輸入! ’ , 0+64+0,‘錯誤’ ) endif (4) frmPassword中 Command2的 Click事件 功能: 釋放當前 窗體 。 程序清單: Mclear events 主程序 當系統(tǒng)運行時,進行部分環(huán)境的設(shè)置,設(shè)置在系統(tǒng)中需要用到的公共變量,打開具體的每 個表,并放到不同的工作區(qū)間,同時調(diào)用第一個運行的登錄窗體 。 2.窗體和源文件定義 文件名: 功能:進行部分環(huán)境的設(shè)置,設(shè)置在系統(tǒng)中需要用到的公共變量,打開具體的每一個表,并放到不同的工作區(qū)間,同時調(diào)用第一個運行的登錄窗體。 程序清單: *設(shè)置環(huán)境變量 clear all set talk off set near on set exact on set excl off 31 set safety off set dele on set century on set date to YMD *設(shè)置系統(tǒng)路徑 public mypath mypath=left(say(16),rat(“ \” ,say(16))) set defa to amp。mypath *為數(shù)據(jù)庫分配工作區(qū)間 selec 1 use 進貨表 selec 2 use 售貨表 selec 3 use 客戶信息表 selec 4 use 庫存表 selec 5 use 用戶表 *調(diào)用登錄窗體 do form frmLogin read events 結(jié)束語 參考文獻 [1] 侯榮濤 .《 Visual Foxpro實用數(shù)據(jù)庫教程 》 .中國電力出版社, 2021. [2] 邵陽 .《 Visual Foxpro數(shù)據(jù)庫系統(tǒng)開發(fā)導(dǎo)航》 .人民郵電出版社, 2021. [3] 黃明梁 ,旭石虎 .《 Visual Foxpro課程設(shè)計指導(dǎo) 》 .電子工業(yè) 出版社, 2021. [4]求是科技 .《 Visual 數(shù)據(jù)開發(fā)技術(shù)與工程實踐》人民郵電出版社 ,2021. [5] 張洪舉,陳艷華,魏珉著 .《 Visual Foxpro程序設(shè)計參考手冊 》 .人民郵電 出版社 ,2021. 32 Storage Management System NanJing University of Information Science amp。 Technology 成教 08(春)計管, NanJing 210044 XuZhaoming ABSTRACT : Storage management is a problem which is closely bound up our daily life. A Storage Management Information System is designed and implemented in this paper. The main contents and results of each step, such as requirement designment, general designment and the testing and application steps, etc, are detailed with in this paper. The management system designed and implemented in this paper can acplish the daily work of storage management correctly and efficiently. Flexible query function is applied by this system. Combining with DBMS, this system provides a good date security function. The system has a good interface for users and can be easily mastered and used. Key word: Storage management 。 database 。 MIS 。 Object Oriented