【机房收费系统】上下机分析
机房收费系统的上下机中,联系的表比较多,分别是: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 AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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 use MySQL database for forecasting and predictive analytics? Overview: Forecasting and predictive analytics play an important role in data analysis. MySQL, a widely used relational database management system, can also be used for prediction and predictive analysis tasks. This article will introduce how to use MySQL for prediction and predictive analysis, and provide relevant code examples. Data preparation: First, we need to prepare relevant data. Suppose we want to do sales forecasting, we need a table with sales data. In MySQL we can use

How to implement data statistics and analysis in uniapp 1. Background introduction Data statistics and analysis are a very important part of the mobile application development process. Through statistics and analysis of user behavior, developers can have an in-depth understanding of user preferences and usage habits. Thereby optimizing product design and user experience. This article will introduce how to implement data statistics and analysis functions in uniapp, and provide some specific code examples. 2. Choose appropriate data statistics and analysis tools. The first step to implement data statistics and analysis in uniapp is to choose the appropriate data statistics and analysis tools.

Real-time log monitoring and analysis under Linux In daily system management and troubleshooting, logs are a very important data source. Through real-time monitoring and analysis of system logs, we can detect abnormal situations in time and handle them accordingly. This article will introduce how to perform real-time log monitoring and analysis under Linux, and provide corresponding code examples. 1. Real-time log monitoring Under Linux, the most commonly used log system is rsyslog. By configuring rsyslog, we can combine the logs of different applications

Summary of case analysis of Python application in intelligent transportation systems: With the rapid development of intelligent transportation systems, Python, as a multifunctional, easy-to-learn and use programming language, is widely used in the development and application of intelligent transportation systems. This article demonstrates the advantages and application potential of Python in the field of intelligent transportation by analyzing application cases of Python in intelligent transportation systems and giving relevant code examples. Introduction Intelligent transportation system refers to the use of modern communication, information, sensing and other technical means to communicate through

Title: Analysis of the reasons and solutions for why the secondary directory of DreamWeaver CMS cannot be opened. Dreamweaver CMS (DedeCMS) is a powerful open source content management system that is widely used in the construction of various websites. However, sometimes during the process of building a website, you may encounter a situation where the secondary directory cannot be opened, which brings trouble to the normal operation of the website. In this article, we will analyze the possible reasons why the secondary directory cannot be opened and provide specific code examples to solve this problem. 1. Possible cause analysis: Pseudo-static rule configuration problem: during use

Title: Is Tencent’s main programming language Go: An in-depth analysis. As China’s leading technology company, Tencent has always attracted much attention in its choice of programming languages. In recent years, some people believe that Tencent mainly adopts Go as its main programming language. This article will conduct an in-depth analysis of whether Tencent's main programming language is Go, and give specific code examples to support this view. 1. Application of Go language in Tencent Go is an open source programming language developed by Google. Its efficiency, concurrency and simplicity are loved by many developers.

How does JavaScript achieve the effect of dragging up and down images? With the development of the Internet, pictures play an important role in our lives and work. In order to improve the user experience, we often need to add some special effects or interactive effects to pictures. Among them, the effect of dragging up and down pictures to switch is a very common, simple and practical effect. This article will introduce how to use JavaScript to achieve this effect and provide specific code examples. First, we need to create an HTML file to display images and implement dragging

Analysis of the advantages and limitations of static positioning technology With the development of modern technology, positioning technology has become an indispensable part of our lives. As one of them, static positioning technology has its unique advantages and limitations. This article will conduct an in-depth analysis of static positioning technology to better understand its current application status and future development trends. First, let’s take a look at the advantages of static positioning technology. Static positioning technology achieves the determination of position information by observing, measuring and calculating the object to be positioned. Compared with other positioning technologies,
