



下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
第2頁共2頁運城學院實驗報告專業:計算機科學與技術系(班):計算機科學與技術系0902班姓名:許永康(2009100210)課程名稱:軟件開發環境與工具實驗項目:超市收銀系統實驗類型:設計型指導老師:南麗麗實驗地點:計算機實驗室一時間:2011-12-10一、實驗目的:1、 掌握VB.NET的基本應用2、掌握基本聯庫的方法二、實驗代碼1、<?xmlversion="1.0"encoding="utf-8"?><configuration><appSettings><addkey="server"value="YCXY-FB7E8ACF2C"/><addkey="uid"value="sa"/><addkey="pwd"value="sql"/><addkey="database"value="systemdata"/></appSettings><system.diagnostics><sources><!--本部分定義My.Application.Log的登錄配置--><sourcename="DefaultSource"switchName="DefaultSwitch"><listeners><addname="FileLog"/><!--取消以下部分的注釋,以寫入應用程序事件日志--><!--<addname="EventLog"/>--></listeners></source></sources><switches><addname="DefaultSwitch"value="Information"/></switches><sharedListeners><addname="FileLog"type="Microsoft.VisualBasic.Logging.FileLogTraceListener,Microsoft.VisualBasic,Version=,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a,processorArchitecture=MSIL"initializeData="FileLogWriter"/><!--取消以下部分的注釋,并用應用程序名替換APPLICATION_NAME,以寫入應用程序事件日志--><!--<addname="EventLog"type="System.Diagnostics.EventLogTraceListener"initializeData="APPLICATION_NAME"/>--></sharedListeners></system.diagnostics></configuration>?xmlversion="1.0"encoding="utf-8"?><configuration><appSettings><addkey="server"value="YCXY-FB7E8ACF2C"/><addkey="uid"value="sa"/><addkey="pwd"value="sql"/><addkey="database"value="systemdata"/></appSettings><system.diagnostics><sources><!--本部分定義My.Application.Log的登錄配置--><sourcename="DefaultSource"switchName="DefaultSwitch"><listeners><addname="FileLog"/><!--取消以下部分的注釋,以寫入應用程序事件日志--><!--<addname="EventLog"/>--></listeners></source></sources><switches><addname="DefaultSwitch"value="Information"/></switches><sharedListeners><addname="FileLog"type="Microsoft.VisualBasic.Logging.FileLogTraceListener,Microsoft.VisualBasic,Version=,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a,processorArchitecture=MSIL"initializeData="FileLogWriter"/><!--取消以下部分的注釋,并用應用程序名替換APPLICATION_NAME,以寫入應用程序事件日志--><!--<addname="EventLog"type="System.Diagnostics.EventLogTraceListener"initializeData="APPLICATION_NAME"/>--></sharedListeners></system.diagnostics></configuration>PublicClassForm1DimoAsNewHY.CT.Class1DimdvAsData.DataView'自定義視圖DimpcurrentindexAsIntegerPrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.ClickDimjAsIntegerdv=o.getall2ds("user_name='"&Me.txtUser.Text&"'","user_pwd='"&System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Me.txtPwd.Text,"md5")&"'").Tables(0).DefaultViewIfdv.Count>0ThenElseEndIfForj=0Todv.Count-1Ifdv.Item(j).Item("user_name").ToString=Me.txtUser.Text_Anddv.Item(j).Item("user_pwd").ToString=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Me.txtPwd.Text,"md5")ThenDimfAsNewfrmMainf.Show()f.WindowState=FormWindowState.MaximizedMe.Close()'屬性里面關機模式改為“當最后一個窗體關閉時”ElseMsgBox("用戶名或密碼錯誤!")Me.txtPwd.Text=""Me.txtUser.Text=""Me.txtPwd.Focus()EndIfExitSubNext'Ifdv.Item(Me.pcurrentindex).Item("user_pwd").ToString=System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Me.txtPwd.Text,"md5")_'Anddv.Item(Me.pcurrentindex).Item("user_name").ToString=Me.txtUser.TextThen'DimfAsNewfrmMain'f.Show()'f.WindowState=FormWindowState.Maximized'Me.Close()'屬性里面關機模式改為“當最后一個窗體關閉時”'Else'MsgBox("密碼錯誤!")'Me.txtPwd.Text=""'Me.txtPwd.SelectAll()'Me.txtPwd.Focus()'EndIfEndSubSubinitdata(ByValpAsString)''dv=o.getall2ds("")'dv=o.getall2ds("").Tables(0).DefaultView'篩選數據EndSubPrivateSubForm2_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load'CallMe.initdata()'Ifdv.Count>0Then'pcurrentindex=dv.Count-1'EndIf'DimiAsInteger''Fori=0ToMe.pcurrentindex''Me.ComboBox1.Items.Add(dv.Item(i).Item("user_name"))''NextiEndSubPrivateSubButton2_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton2.ClickMe.Close()EndSubEnd
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 臨滄云南臨滄鳳慶縣招聘社區專職工作者17人筆試歷年參考題庫附帶答案詳解
- 二零二五版公司保密協議書中英文對照范文
- 臨沂2024年山東臨沂郯城縣考聘城市社區專職工作者20人筆試歷年參考題庫附帶答案詳解
- 二零二五公司委任獨立董事合同
- 《縫香袋》(教案)-四年級下冊勞動浙教版
- 場鋪面租賃合同書二零二五年
- 二零二五版房子歸乙方離婚協議書
- 人教版數學五年級上冊-23練習五-教學課件
- 中央2025年中國科協所屬單位招聘社會在職人員14人筆試歷年參考題庫附帶答案詳解
- 住房公積金優化調整新方案落地
- 2025-2030中國浮吊行業市場發展趨勢與前景展望戰略分析研究報告
- 918勿忘國恥銘記歷史課件-高一上學期主題班會
- 船舶英語考試練習題及答案1-2023-練習版
- 2025年中國景泰藍擺件盒市場調查研究報告
- 公共關系學電子教案
- 王者榮耀考試試題及答案
- 杭州市市級機關事業單位招聘真題2024
- 高速公路消防知識
- 地下混凝土水池蓄水試驗方案20240401
- 頭暈、抑郁與焦慮關系解析與應對策略
- 初中入團考試題型及答案
評論
0/150
提交評論