機房收費系統 上機下機

2021-08-10 16:48:06 字數 2934 閱讀 3458

上下級是機房收費系統最基本的操作,沒有上下機,以後的操作都是根據上下機操作的以及為上下級服務的,所以我們需要在弄機房的時候,首先要對這個操作思路整理清楚!

上機就是你去網咖去了,在網管那裡刷一下身份證,挑選自己的機子,然後輸入身份證號,密碼,進入主介面,此時,系統開始計時,同時在使用者介面,你也可以看到餘額、上機時間等一系列你帳號的資訊!

我們的機房收費系統的上機簡單來說就是三部:judge,input,output!(相對而言比較簡單)

簡單清晰的流程圖奉上

下機與上機相對,就是你玩完了,準備回家了,結一下賬,要不系統還是會給你計算著時間,下次來的時候,你的網費就不翼而飛了!

(這裡有個小故事,我想和大家說一下,之前我可喜歡上網了,有一次去網咖,身份證裡沒有錢了,我於是就衝了好多(因為衝的多送的也多嘛),可是回家的時候,不知道是我沒有結賬還是那台機子有問題,就沒有下機,過了兩天我去的時候,我衝的錢都沒了!服了服了,如果是那個收費系統的問題,我這個消費者算是被坑慘了,所以大家一定要把自己的下機過程理好,不要坑消費者)

下機和上機的步驟大致差不多,多的就是金錢和時間的計算(時間就是金錢嘛)!

廢話不多說,流程圖奉上!

時間和金錢計算的**奉上!

定義一些變數用於儲存資料

dim intlinetime as

integer

dim intconsume as

single

dim curconsume as

single

'儲存真正花費錢的時間

dim curbalance as

single

'儲存使用者的餘額

dim fixedunit as

single

'儲存單位金額

dim temunit as

single

'儲存單位時間

dim a as

integer

dim remaincash as

single

進行計算

intlinetime = (date - datevalue(mrc1!ondate)) * 1440 + (hour(time) - hour(timevalue(mrc1!ontime))) * 60 + (minute(time) - minute(timevalue(mrc1!ontime)))

'時間單位為分鐘

'獲得基本表的資料

txtsql3 = "select * from basicdata_info"

set mrc3 = executesql(txtsql3, msgtext) 'mrc3連線basicdata表

mrc3.movelast

'單位時間的費用 (把固定使用者,臨時使用者單位時間的費用分別賦值給費用)

fixedunit = val(mrc3.fields(0)) '把固定使用者的金額賦值給變數

temunit = val(mrc3.fields(1)) '把臨時使用者的金額賦值給變數

if intlinetime <= val(trim(mrc3.fields(4))) then

txtofftime.text = "0"

else

if intlinetime < val(trim(mrc3.fields(3))) then

txtctime.text = "0"

endif

endif

if intlinetime >= val(trim(mrc3!leasttime)) and intlinetime and

trim(mrc!type) = "固定使用者"

then

a = int(intlinetime / val(trim(mrc3!unittime)))

if a = intlinetime / trim(mrc3!unittime) then

curconsume = a

else

curconsume = a + 1

endif

txtcash.text = val(curconsume) * val(fixedunit)

3if txtcash.text = ""

then txtcash.text = "0"

else

if intlinetime >= val(trim(mrc3!leasttime)) and intlinetime

andtrim(mrc.fields(14)) = "臨時使用者"

then

a = int(intlinetime / val(trim(mrc3!unittime)))

if a = intlinetime / trim(mrc3!unittime) then

curconsume = a

else

curconsume = a + 1

endif

txtcash.text = val(curconsume) * val(temunit)

endifend

if'更新student表

txtsql = "select * from student_info where cardno='" & trim(txtcardno.text) & "'"

set mrc = executesql(txtsql, msgtext)

remaincash = mrc!cash - val(txtcash.text)

mrc.fields(7) = remaincash

mrc.update

mrc.close

希望對大家有所幫助!

機房收費系統 下機

有了上機的思路,下機當然也就很簡單了,不過總是要比別人多想一步,這樣你就能夠比別人更加的優秀。下機的流程圖 下機的注意事項 txtontime.text trim mrc3.fields 7 txtdowndate.text format now yyyy mm dd txtdowntime.tex...

機房收費系統 下機

上下機是機房收費系統中比較重要的一部分,所以我們一定要把上下機的思路理清楚才可以,不然會很亂,一會兒就把自己繞進去了,現在我們一起分析一下下機的思路吧!片段 判斷上下機的情況 private sub cmdoffline click dim mrconline as adodb.recordset ...

機房收費系統 下機

計算消費時間 計算上機時間 intlinetime date datevalue onw ondate 1440 hour time hour timevalue onw ontime 60 minute time minute timevalue onw ontime 計算機上機時間 txtcti...