freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

及代碼-考勤管理系統(tǒng)-文庫吧

2025-01-01 11:01 本頁面


【正文】 個(gè) Bevel 組件, 1 個(gè) Image 組件, 2 個(gè) BitBtn組件和 1 個(gè) GroupBox組件,并安排布局如下圖。 完成了登錄窗體的設(shè)計(jì)之后,需要進(jìn)行事件的分析和處理。首先對(duì)主頁中的 Label3的 OnClick和 OnMouseDown 事件添加以下的代碼,功能是當(dāng)用戶將鼠標(biāo)移動(dòng)到該組件上時(shí),出現(xiàn)超鏈接的效果,同時(shí)啟動(dòng)郵件收發(fā)程序向指定的電子郵件地址發(fā)信息。 procedure (Sender: TObject)。 begin ShellExecute(handle,nil,pchar(39。mailto:39。),nil,nil,sw_shownormal)。 end。 procedure (Sender: TObject。 Shift: TShiftState。 X, Y: Integer)。 begin :=clmaroon。 天道酬勤 Business School of Central South University end。 接下來在系統(tǒng)登錄窗體的 OnCreate事件中進(jìn)行 INI配置文件的設(shè) 置與初始化。在事件的右邊窗格中雙擊鼠標(biāo),即可打空的事件處理句柄,用戶可在此進(jìn)行編輯。程序代碼如下。 procedure (Sender: TObject)。 var datafile:file。 NumRead,NumWrite,ii:integer。 siz:longint。 FileOk:boolean。 buf:string[60]。 begin FileOk:=true。 assignfile(datafile,39。39。)。 if fileexists(39。39。)=false then fileok:=false else begin reset(datafile)。 siz:=filesize(datafile)。 if siz24 then fileok:=false。 end。 if fileok=false then begin rewrite(datafile,1)。 buf:=39。system39。 blockwrite(datafile,buf,12,numwrite)。 buf:=39。system39。 blockwrite(datafile,buf,12,numwrite)。 buf:=39。renshi39。 blockwrite(datafile,buf,12,numwrite)。 buf:=39。renshi39。 blockwrite(datafile,buf,12,numwrite)。 天道酬勤 Business School of Central South University buf:=39。caiwu39。 blockwrite(datafile,buf,12,numwrite)。 buf:=39。caiwu39。 blockwrite(datafile,buf,12,numwrite)。 closefile(datafile)。 end。 reset(datafile,1)。 repeat blockread(datafile,buf,12,numread)。 if numread10 then (buf)。 blockread(datafile,buf,12,numread)。 until(numread=0)。 closefile(datafile)。 end。 在多數(shù)的情況下,用 戶希望輸入密碼后直接按 Enter 鍵就完成登錄過程,進(jìn)入系統(tǒng)主界面。此時(shí),可在登錄窗體的OnKeyPress 事件中添加以下代碼。 procedure (Sender: TObject。 var Key: Char)。 begin if key=13 then begin perform(WM_NEXTDLGCTL,0,0)。 END。 end。 在系統(tǒng)登錄窗口要進(jìn)行密碼的驗(yàn)證,若輸入 3 次不正確,將禁止用戶繼續(xù)登錄,并退出 應(yīng)用程序。代碼如下: procedure (Sender: TObject)。 var cmptimes,bn:integer。 ss1,ss2:string[200]。 begin 天道酬勤 Business School of Central South University cmptimes:=1。 if passwordin=false then begin passwordin:=true。 repeat bn:=。 if bn=mrok then begin ss1:=。 ss2:=。 if cmppassword(ss1,ss2) then cmptimes:=100 else begin cmptimes:=cmptimes+1。 if cmptimes3 then close else messagedlg(39。密碼錯(cuò)誤,請(qǐng)重新輸入,一共三次機(jī)會(huì)! 39。,mtwarning,[mbok],0)。 end。 end else {bn=mrcancel} begin cmptimes:=100。 close。 end。 until(cmptimes3)。 if =39。system39。 then begin 。 :=tabsheet1。 :=true。 end else if =39。renshi39。 then begin 。 :=tabsheet1。 天道酬勤 Business School of Central South University :=true。 :=false。 end else if =39。caiwu39。 then begin 。 :=tabsheet3。 :=false。 :=false。 end else if =39。guest39。 then begin 。 :=tabsheet1。 :=alclient。 :=True。 :=39。您只有瀏覽的權(quán)利! 39。 :=True。 :=true。 :=false。 :=false。 :=false。 :=false。 :=false。 end。 end。 end。 應(yīng)該注意的是 TabSheet 組件有一個(gè) TabVaisible 屬性,該屬性用來定義該 TabSheet 組件是否在 PageControl 組件中可視,通過給該屬性賦值,可限制某些用戶對(duì)某些信息的瀏覽和修改。系統(tǒng)登錄窗口將在主窗體激活前顯示。還要在主窗體的 private 處添加定義如下 : 天道酬勤 Business School of Central South University private passwordin:boolean。 truesalary:real。 function cmppassword(s1:string。 s2:string):boolean。{ Private declarations } 此處定義的 password 函數(shù)用來比較密碼,代碼如下: function (s1:string。s2:string):boolean。 var datafile:file。 rt:boolean。 numread:integer。 buf1,buf2:string[30]。 begin rt:=false。 assignfile(datafile,39。39。)。 reset(datafile,1)。 repeat blockread(datafile,buf1,12,numread)。 blockread(datafile,buf2,12,numread)。 if (s1=buf1) and (s2=buf2) then begin username:=s1。 userpass:=s2。 result:=true。 exit。 end。 until(numread=0)。 closefile(datafile)。 cmppassword:=rt。 end。 就此完成了登錄窗體。 2. 員工信息模塊 本模塊的作用是輸入和瀏覽員工的基本信息,而對(duì)于人事部門的用戶及管理遠(yuǎn)登陸還要考慮可以更改員工的基本信息。 天道酬勤 Business School of Central South University 本模塊可以分為兩部分,使用 Bevel 組件分開,在系統(tǒng)登陸窗體設(shè)計(jì)中曾使用過這個(gè)組件。事實(shí)上, Bevel 組件是一個(gè)修飾組件,允許用戶在窗體中顯示線、框和框架,常用于分割顯示不同應(yīng)用組件??稍O(shè)置組件為凹下和凸起狀態(tài)。 Bevel 組件有倆個(gè)最重要的屬性 Shape 屬性和Style 屬性。 Shape 屬性該屬性定義 B evel 組件在窗體中顯示的形狀。Style 該屬性確定 Bevel 組件的顯示形狀是凹下還是凸起,若其值為 bsLowered,則為凹下狀態(tài);若值為 bsRasised,則 Bevel 組件呈凸起狀態(tài)。在 Bevel2中添加八個(gè) Label組件,六個(gè) Edit組件和兩個(gè) ComboBox組件。完成設(shè)置后,再添加一個(gè) BitBtn組件 BitBtn1,并設(shè)置 Kind屬性為 bkOK,camption 屬性為“輸入記錄”。在員工信息模塊的右半部分添加一個(gè)DBGrid組件,一個(gè) DataSourcu組件,一個(gè) Table組件和一個(gè) DBNavigator組件。 不是任何一個(gè)用戶登陸后都可以對(duì)員工基本信息進(jìn)行 修改的,因此將 Dbnavigator組件的 Visible屬性設(shè)置為 False,而對(duì) system和 renshi兩個(gè)用戶,則在程序運(yùn)行時(shí),將 Visible 屬性設(shè)置為 True. 根據(jù)需要,有時(shí)要在數(shù)據(jù)表內(nèi)增加一些自定義的字段,常常是根據(jù)表中其他字段動(dòng)態(tài)地計(jì)算出來的,這些字段可稱為計(jì)算字段。計(jì)算字段是在程序設(shè)計(jì)中常用的一個(gè)手段,它在程序運(yùn)行時(shí)生成,在程序結(jié)束時(shí) 天道酬勤 Business School of Central South University 消失,不會(huì)在數(shù)據(jù)表中占用空間。 最后指出的是,員工編號(hào)一般是數(shù)字字符,必須要強(qiáng)制用戶輸入數(shù)字字符而不能輸入其他字符。 Style 屬性確定了下圖 輸入 編號(hào),姓名,性別,職稱等如下圖運(yùn)行。 天道酬勤 Business School of Central South University 添加一個(gè) BitBtn 組件, Caption 屬性為“輸入記錄”,代碼如下 : if (=39。39。) or (=39。39。) or (=39。39。) or (=39。39。) or(=39。39。) or (=39。39。) or (=39。39。) then begin MessageDlg(39。資料輸入不全 !39。, mtWarning, [mbOk], 0)。 exit。 end。 :=true。 with table1 do begin append。 FieldValues[39。bianhao39。] := trim()。 FieldValues[39。xingming39。] := trim()。 FieldValues[39。sex39。] := t
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1