frm_fix.frm
资源名称:jtlc.rar [点击查看]
上传用户:xxdyjx888
上传日期:2022-06-01
资源大小:55k
文件大小:11k
源码类别:
家庭/个人应用
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
- Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
- Begin VB.Form frm_fix
- BackColor = &H80000000&
- Caption = "定期存款"
- ClientHeight = 5505
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 8790
- Icon = "frm_fix.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 5505
- ScaleWidth = 8790
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton cmd_quit
- BackColor = &H000080FF&
- Caption = "退出"
- Height = 375
- Left = 5160
- TabIndex = 21
- Top = 4920
- Width = 855
- End
- Begin VB.CommandButton cmd_del
- BackColor = &H000080FF&
- Caption = "删除"
- Height = 375
- Left = 4320
- TabIndex = 20
- Top = 4920
- Width = 855
- End
- Begin VB.CommandButton cmd_edit
- BackColor = &H000080FF&
- Caption = "修改"
- Height = 375
- Left = 3480
- TabIndex = 19
- Top = 4920
- Width = 855
- End
- Begin VB.CommandButton cmd_add
- BackColor = &H000080FF&
- Caption = "添加"
- Height = 375
- Left = 2640
- TabIndex = 18
- Top = 4920
- Width = 855
- End
- Begin VB.Frame Frame1
- Height = 1815
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 8775
- Begin VB.ComboBox Combo1
- Height = 300
- Left = 6240
- Style = 2 'Dropdown List
- TabIndex = 23
- Top = 960
- Width = 1110
- End
- Begin VB.TextBox txt_key
- Height = 270
- Left = 6480
- TabIndex = 22
- Text = "Text1"
- Top = 1440
- Visible = 0 'False
- Width = 735
- End
- Begin VB.CheckBox Check1
- BackColor = &H80000000&
- Caption = "已取"
- ForeColor = &H000000FF&
- Height = 255
- Left = 5280
- TabIndex = 17
- Top = 1320
- Width = 855
- End
- Begin VB.TextBox txt_money
- Height = 270
- Left = 6240
- TabIndex = 11
- Top = 240
- Width = 735
- End
- Begin VB.TextBox txt_time
- Height = 270
- Left = 6240
- TabIndex = 10
- Top = 600
- Width = 495
- End
- Begin VB.TextBox txt_name
- Height = 270
- Left = 1680
- TabIndex = 6
- Top = 600
- Width = 2655
- End
- Begin VB.TextBox txt_address
- Height = 270
- Left = 1680
- TabIndex = 5
- Top = 960
- Width = 2655
- End
- Begin VB.TextBox txt_size
- Height = 270
- Left = 1680
- TabIndex = 4
- Top = 1320
- Width = 2655
- End
- Begin MSComCtl2.DTPicker DTPicker1
- Height = 300
- Left = 1680
- TabIndex = 2
- Top = 240
- Width = 1335
- _ExtentX = 2355
- _ExtentY = 529
- _Version = 393216
- Format = 64487425
- CurrentDate = 37856
- End
- Begin VB.Label Label8
- BackStyle = 0 'Transparent
- Caption = "存款人:"
- Height = 255
- Left = 5280
- TabIndex = 16
- Top = 960
- Width = 855
- End
- Begin VB.Label Label5
- BackStyle = 0 'Transparent
- Caption = "金额:"
- Height = 255
- Left = 5280
- TabIndex = 15
- Top = 240
- Width = 615
- End
- Begin VB.Label Label6
- BackStyle = 0 'Transparent
- Caption = "元"
- Height = 255
- Left = 7080
- TabIndex = 14
- Top = 240
- Width = 255
- End
- Begin VB.Label Label11
- BackStyle = 0 'Transparent
- Caption = "月"
- Height = 255
- Left = 6840
- TabIndex = 13
- Top = 600
- Width = 615
- End
- Begin VB.Label Label12
- BackStyle = 0 'Transparent
- Caption = "期限:"
- Height = 255
- Left = 5280
- TabIndex = 12
- Top = 600
- Width = 735
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "银行名称:"
- Height = 255
- Left = 600
- TabIndex = 9
- Top = 600
- Width = 1215
- End
- Begin VB.Label Label3
- BackStyle = 0 'Transparent
- Caption = "银行地址:"
- Height = 255
- Left = 600
- TabIndex = 8
- Top = 960
- Width = 1095
- End
- Begin VB.Label Label4
- BackStyle = 0 'Transparent
- Caption = "银行账号:"
- Height = 255
- Left = 600
- TabIndex = 7
- Top = 1320
- Width = 1095
- End
- Begin VB.Label Label1
- Caption = "存款日期:"
- Height = 255
- Left = 600
- TabIndex = 3
- Top = 240
- Width = 1095
- End
- End
- Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1
- Height = 2775
- Left = 0
- TabIndex = 0
- Top = 1920
- Width = 8775
- _ExtentX = 15478
- _ExtentY = 4895
- _Version = 393216
- AllowUserResizing= 1
- _NumberOfBands = 1
- _Band(0).Cols = 2
- End
- End
- Attribute VB_Name = "frm_fix"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Mydb As New ADODB.Recordset
- Dim Mydb1 As New ADODB.Recordset
- Dim Man As New ADODB.Recordset
- Dim Count1 As New ADODB.Recordset
- Dim Str_text As String
- Private Sub cmd_add_Click()
- On Error Resume Next
- Dim A, B
- B = 1
- Set Count1 = ExeCutesql("select key from 定期存款 ", Str_text)
- Count1.MoveLast
- B = Count1.Fields(0) + 1
- A = MsgBox("是否添加前记录?", vbYesNo + 32, "修改记录")
- If A = vbYes Then
- ExeCutesql "insert into 定期存款 values('" & Format(DTPicker1.Value, "yyyy-mm-dd") & "','" & txt_name.Text _
- & "','" & txt_address.Text & "','" & txt_size.Text & "'," & txt_money.Text & ",'" & txt_time.Text & "','" & Combo1.Text & "','" & Check1.Value & "'," & B & ")", Str_text
- Call Bangding
- End If
- End Sub
- Private Sub cmd_del_Click()
- On Error Resume Next
- Dim A
- A = MsgBox("是否删除当前记录?", vbYesNo + 32 + 256, "添加记录")
- If A = vbYes Then
- ExeCutesql "DELETE from 定期存款 where key=" & txt_key.Text & "", Str_text
- Call Bangding
- End If
- End Sub
- Private Sub cmd_edit_Click()
- On Error Resume Next
- Dim A
- A = MsgBox("是否修改前记录?", vbYesNo + 32, "添加记录")
- If A = vbYes Then
- ExeCutesql "Update 定期存款 Set 日期 = '" & DTPicker1.Value & "',银行名称='" & txt_name.Text _
- & "',银行地址=" & txt_address.Text & ", 银行账号='" & txt_size.Text & "',金额='" & txt_money.Text _
- & "',期限='" & txt_time.Text & "',存款人='" & Combo1.Text & "',取否='" & Check1.Value & "' Where key = " & txt_key.Text & " ", Str_text
- 'Mydb.Requery
- Call Bangding
- MsgBox "数据修改成功!", vbOKOnly + 64, "成功"
- End If
- End Sub
- Private Sub cmd_quit_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Dim A As Integer
- DTPicker1.Value = Date
- Call Bangding
- Set Mydb1 = ExeCutesql("select 姓名 from 成员 ", Str_text)
- A = Mydb1.RecordCount
- Set Combo1.DataSource = Mydb1
- For I = 1 To A
- Combo1.AddItem Mydb1.Fields(0)
- Mydb1.MoveNext
- If Mydb1.EOF Then Exit For
- Next I
- End Sub
- Private Function Bangding()
- Set Mydb = ExeCutesql("select * from 定期存款 ", Str_text)
- Set MSHFlexGrid1.DataSource = Mydb
- End Function
- Private Sub MSHFlexGrid1_Click()
- On Error Resume Next
- DTPicker1.Value = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 1)
- txt_name.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 2)
- txt_address.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 3)
- txt_size.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 4)
- txt_money.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 5)
- txt_time.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 6)
- Combo1.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 7)
- Check1.Value = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 8)
- txt_key.Text = MSHFlexGrid1.TextMatrix(MSHFlexGrid1.Row, 9)
- End Sub