以下是引用片段:
其代码实现如下: Private Sub btn添加_Click() '判断当前的信息是不是允许等待结账(等待结帐指:用户先用餐,最后结账!) '存储等待结账的信息 '1 If Val(Me.Text7.Text) <= 0 Then MsgBox "当前没有任何的消费商品!" Exit Sub End If If Val(Me.Text6.Text) > 0 Then MsgBox "有交费金额不能等待结帐!" Exit Sub End If '2 Call addData(0) Call frmSell.updatelist(frmSell.boolShow单据) Unload Me End Sub
Private Sub ddd_DblClick() '将当前的表格内容信息显示在frmSpxz中 If ddd.TextMatrix(ddd.Row, 0) = "" Then Exit Sub frmSpXZ.Text2.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 0)) frmSpXZ.Text1.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 1)) frmSpXZ.Text3.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 2)) frmSpXZ.Text4.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 3)) frmSpXZ.Text5.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 4)) frmSpXZ.Text6.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 5)) frmSpXZ.Text7.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 6)) frmSpXZ.Text8.Text = Trim(Me.ddd.TextMatrix(ddd.Row, 7)) Call ShowPicture(frmSpXZ.Picture1, Trim(ddd.TextMatrix(ddd.Row, 0))) frmSpXZ.Show 1 End Sub
Private Sub ddd_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) '显示当前商品的图片 Me.Picture1.Visible = False If ddd.Row <= 0 Then Exit Sub If ddd.TextMatrix(ddd.Row, 0) = "" Then Exit Sub If ShowPicture(Me.Picture1, ddd.TextMatrix(ddd.Row, 0)) = False Then Exit Sub Me.Picture1.Move Me.ddd.Width - 2 * Me.Picture1.Width, Me.ddd.CellTop Me.Picture1.Visible = True End Sub
|