⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 转账.frm

📁 C/S模块
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Width           =   960
      End
   End
End
Attribute VB_Name = "Form10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public yg10 As String
Public yh10 As String

Private Sub Check1_Click()
Check2.Value = 0
End Sub

Private Sub Check2_Click()
Check1.Value = 0
End Sub



Private Sub Command2_Click(Index As Integer)

Unload Me
Form3.Show
End Sub


Private Sub Command3_Click()
Dim balance1 As Integer
Dim nowTime As String
    nowTime = Now
    If (Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "") Then
    MsgBox "输入不完整"
    Exit Sub
    ElseIf (Option1.Value = False And Option2.Value = False) Then
    MsgBox "请选择用卡还是账号进行转账?"
    Exit Sub
    ElseIf Not IsNumeric(Text1.Text) Then
    MsgBox "卡和帐户必需为位数字!", vbRetryCancel + vbExclamation, "错误提示"
    Text1.SetFocus
    Exit Sub
    ElseIf Len(Text1.Text) <> 18 Then
    MsgBox "卡和帐户长度必需为18位!", vbRetryCancel + vbExclamation, "错误提示"
    Text1.SetFocus
    Exit Sub
    ElseIf Not IsNumeric(Text2.Text) And Len(Text2.Text) <> 6 Then
    MsgBox "密码6位数字!", vbRetryCancel + vbExclamation, "错误提示"
    Text2.SetFocus
    Exit Sub
    ElseIf Not IsNumeric(Text3.Text) Then
    MsgBox "转账金额格式不正确!", vbRetryCancel + vbExclamation, "错误提示"
    Text3.SetFocus
    Exit Sub
    ElseIf Check1.Value <> 1 And Check2.Value <> 1 Then
    MsgBox "请选择是转到卡还是帐户!"
    Exit Sub
    ElseIf Not IsNumeric(Text4.Text) Then
    MsgBox "目的方卡和帐户必需为位数字!", vbRetryCancel + vbExclamation, "错误提示"
    Text4.SetFocus
    Exit Sub
    ElseIf Len(Text4.Text) <> 18 Then
    MsgBox "目的方的卡和帐户长度必需为18位!", vbRetryCancel + vbExclamation, "错误提示"
    Text4.SetFocus
    Exit Sub
    ElseIf Text1.Text = Text4.Text Then
    MsgBox "转出和转入号不能一致", vbRetryCancel + vbExclamation, "错误提示"
    Text1.SetFocus
    Exit Sub
ElseIf Option1.Value = True Then
          Call openconn
          rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'and c_key='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
    If rs.BOF And rs.EOF Then
               MsgBox "输入密码或卡号错误", vbRetryCancel + vbExclamation, "错误提示"
               rs.Close
               Unload Me
               Form10.Show
               ElseIf (rs!lost) = True Then
               MsgBox "您的卡已被挂失不能转账!"
               rs.Close
               Unload Me
               Form10.Show
     Else
              balance1 = rs!balance
               rs.Close
          If balance1 < Trim(Text3.Text) Then
               MsgBox "余额不足不能转账!"
               Unload Me
               Form10.Show
          Else
              If Check1.Value = 1 Then
              rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text4.Text) & "'", conn, adOpenDynamic, adLockOptimistic
               If rs.BOF And rs.EOF Then
               MsgBox "要转入的卡号不存在"
               rs.Close
               Unload Me
               Form10.Show
               ElseIf (rs!lost) = True Then
               MsgBox "对方的卡已被挂失不能转账!"
               rs.Close
               Unload Me
               Form10.Show
               Else
               rs.Fields(3) = rs!balance + Trim(Text3.Text)
               rs.Update
               rs.Close
               rs.Open "select * from access_xx053_06 ", conn, adOpenDynamic, adLockOptimistic
               conn.Execute "insert into access_xx053_06 values(0,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "','" & Trim(Text1.Text) & "',null)"
               conn.Execute "insert into access_xx053_06 values(1,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "','" & Trim(Text4.Text) & "',null)"
               rs.Close
               MsgBox "现金已转入卡号:" & Trim(Text4.Text)
               rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'", conn, adOpenDynamic, adLockOptimistic
               rs.Fields(3) = rs!balance - Trim(Text3.Text)
               rs.Update
               rs.Close
               MsgBox "成功转出现金:" & Trim(Text3.Text)
              End If
              Else
              rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text4.Text) & "'", conn, adOpenDynamic, adLockOptimistic
              If rs.BOF And rs.EOF Then
               MsgBox "要转入的账号不存在"
               rs.Close
               Unload Me
               Form10.Show
               ElseIf (rs!lost) = True Then
               MsgBox "对方的账号已被挂失不能转账!"
               rs.Close
               Unload Me
               Form10.Show
               Else
               rs.Fields(7) = rs!balance + Trim(Text3.Text)
               rs.Update
               rs.Close
               MsgBox "现金已转入账号:" & Trim(Text4.Text)
               rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text1.Text) & "'", conn, adOpenDynamic, adLockOptimistic
               rs.Fields(3) = rs!balance - Trim(Text3.Text)
               rs.Update
               rs.Close
                rs.Open "select * from access_xx053_06 ", conn, adOpenDynamic, adLockOptimistic
               conn.Execute "insert into access_xx053_06 values(0,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "','" & Trim(Text1.Text) & "',null)"
               conn.Execute "insert into access_xx053_06 values(1,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "',null,'" & Trim(Text4.Text) & "')"
               MsgBox "成功转出现金:" & Trim(Text3.Text)
                rs.Close
               End If
               End If
    End If
   End If
 Else
          Call openconn
          rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'and b_key='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
    If rs.BOF And rs.EOF Then
             MsgBox "输入密码或账号错误", vbRetryCancel + vbExclamation, "错误提示"
              rs.Close
              Unload Me
              Form10.Show
               ElseIf (rs!lost) = True Then
               MsgBox "您的帐户已被挂失不能转账!"
               rs.Close
               Unload Me
               Form10.Show
Else
                 balance1 = rs!balance
  If balance1 < Trim(Text3.Text) Then
                 MsgBox "余额不足不能转账!"
                  rs.Close
                  Unload Me
                   Form10.Show
   Else
                rs.Close
               If Check1.Value = 1 Then
               rs.Open "select * from card_xx053_06 where c_No='" & Trim(Text4.Text) & "'", conn, adOpenDynamic, adLockOptimistic
               If rs.BOF And rs.EOF Then
               MsgBox "要转入的卡号不存在"
               rs.Close
               Unload Me
               Form10.Show
               ElseIf (rs!lost) = True Then
               MsgBox "对方的卡已被挂失不能转账!"
               rs.Close
               Unload Me
               Form10.Show
               Else
               rs.Fields(3) = rs!balance + Trim(Text3.Text)
               rs.Update
               rs.Close
               MsgBox "现金已转入卡号:" & Trim(Text4.Text)
               rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'", conn, adOpenDynamic, adLockOptimistic
               rs.Fields(7) = rs!balance - Trim(Text3.Text)
               rs.Update
               rs.Close
               rs.Open "select * from access_xx053_06 ", conn, adOpenDynamic, adLockOptimistic
               conn.Execute "insert into access_xx053_06 values(0,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "',null,'" & Trim(Text1.Text) & "')"
               conn.Execute "insert into access_xx053_06 values(1,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "','" & Trim(Text4.Text) & "',null)"
               MsgBox "成功转出现金:" & Trim(Text3.Text)
               rs.Close
              End If
          Else
              rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text4.Text) & "'", conn, adOpenDynamic, adLockOptimistic
              If rs.BOF And rs.EOF Then
               MsgBox "要转入的账号不存在"
               rs.Close
               Unload Me
               Form10.Show
               ElseIf (rs!lost) = True Then
               MsgBox "对方的账号已被挂失不能转账!"
               rs.Close
               Unload Me
               Form10.Show
               Else
               rs.Fields(7) = rs!balance + Trim(Text3.Text)
               rs.Update
               rs.Close
               MsgBox "现金已转入帐号:" & Trim(Text4.Text)
               rs.Open "select * from account_xx053_06 where b_No='" & Trim(Text1.Text) & "'", conn, adOpenDynamic, adLockOptimistic
               rs.Fields(7) = rs!balance - Trim(Text3.Text)
               rs.Update
               rs.Close
               rs.Open "select * from access_xx053_06 ", conn, adOpenDynamic, adLockOptimistic
               conn.Execute "insert into access_xx053_06 values(0,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "',null,'" & Trim(Text1.Text) & "')"
               conn.Execute "insert into access_xx053_06 values(1,'" & Trim(Text3.Text) & "','" & nowTime & "','" & yh10 & "','" & yg10 & "',null,'" & Trim(Text4.Text) & "')"
               MsgBox "成功转出现金:" & Trim(Text3.Text)
               rs.Close
              End If
           End If
     End If
End If
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -