【机房收费系统】上下机分析
Jun 07, 2016 pm 04:02 PM机房收费系统的上下机中,联系的表比较多,分别是:Student表,Online表,Cancelcard表,BasicData表,Line表。表多了关系自然也就会增加,理清思路,才能让后面的学习事半功倍,是一件很锻炼和发掘逻辑能力的工作。 下机之后对消费情况进行计算 上机学生分
机房收费系统的上下机中,联系的表比较多,分别是:Student表,Online表,Cancelcard表,BasicData表,Line表。表多了关系自然也就会增加,理清思路,才能让后面的学习事半功倍,是一件很锻炼和发掘逻辑能力的工作。
下机之后对消费情况进行计算
上机学生分为两种固定用户和临时用户,他们的区别只是单位时间消费的金额不同,相当于网吧的会员和普通用户。
BasicDate表中设定了收费计算情况的基本信息
准备时间,最少时间,递增时间,两种用户单位消费金额
用datediff函数计算出消费时间,将单位转换为分钟:
txtConsumeTime.Text =Int(DateDiff("n", mrc3.Fields("ondate"),txtOffdate.Text)) + Int(DateDiff("n", mrc3.Fields("ontime"), txtOfftime.Text))
做出如下判断
If 消费时间
不要钱,消费金额为0
Else
If 消费时间
收单位时间的钱
End if
If 消费时间整除递增时间 then
消费金额=(消费时间\递增时间)* 单位金额
Else
消费金额=((消费时间\递增时间)+1)*单位金额(相当于进一法,有利于商家)
End if
End if
单位金额出要对用户进行判断,不同身份的用户单位金额不同。最后将对应的改变的信息,给Line和Student表,并之后在界面上显示出来。下机成功。
这个过程中界面上的操作,最终转变为对表的查,删,改,更。蝴蝶效应,一个数据的变化,后面引起多个表的修改,最后再反馈到界面上,整个学习的过程中,理清思路的逻辑思维能力是这个过程最重要的,锻炼了我们的能力。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to implement data statistics and analysis in uniapp

How to use MySQL database for forecasting and predictive analytics?

Real-time log monitoring and analysis under Linux

Analysis of the reasons why the secondary directory of DreamWeaver CMS cannot be opened

ThinkPHP6 code performance analysis: locating performance bottlenecks

Performance analysis and optimization strategy of TP6 Think-Swoole RPC service

How to use JavaScript to achieve the effect of dragging up and down images?

Analyze whether Tencent's main programming language is Go
