附件发不上却呀,下面是在text5文本框的gotfocus中写的,有不对吗?
rda=(Day(Ctot(Thisform.text6.Value)))
lda=(Day(Ctot(Thisform.text7.Value)))
rho=(Hour(Ctot(Thisform.text6.Value)))
lho=(Hour(Ctot(Thisform.text7.Value)))
rmi=(Minute(Ctot(Thisform.text6.Value)))
lmi=(Minute(Ctot(Thisform.text7.Value)))
jsnm=(lda-rda) * (thisform.text5.Value))&&设变量jsnm记录 入住天数*房标 的值 即基础房费
Do Case
Case Thisform.label4.Caption='全价'
Do Case
Case (lda-rda)*100+lho > (lda-rda)*100+18&&若离店时间为将来某天的18点以后
thisform.text8.value=(jsnm)+(thisform.text5.Value)&&收费为基础房费再加一个房标
Case (lda-rda)*100+lho <= (lda-rda)*100+14
thisform.text8.value=(jsnm)+0
Case (lda-rda)*100+lho <=(lda-rda)*100+17
thisform.text8.value=(jsnm)+60
Case (lda-rda)*100+lho <=(lda-rda)*100+18
thisform.text8.value=(jsnm)+80
Endcase
Case Thisform.label4.Caption='钟点'
zdjg=Floor((lda-rda)+(lho-rho)+(60-rmi+lmi)/100)&&计算两个时间点之间时间间隔
Do Case
Case zdjg <=3
Thisform.text8.Value=(Thisform.text5.Value)+0
Case zdjg<= 4
Thisform.text8.Value=(Thisform.text5.Value)+20
Case zdjg >= 5
Thisform.text8.Value=(Thisform.text5.Value)+50
Endcase
Case Thisform.label4.Caption='半价'
Thisform.text8.Value=(Thisform.text5.Value)+0
Endcase